Re: [Nagios-users] Plugin for monitoring FreeBSD for updates (like check_apt)?

2007-11-14 Thread Matthias Kellermann
Hi list,

I've made some progress with a Nagios Plugin for the FreeBSD Ports.

It's called check_ports for now and the first version can be found here:
http://dl.adminlife.net/check_ports

Please don't blame me for my coding style - I'm not a shell hacker ;)

The plugin does the following:
If you start it without a parameter it will check the host system for
updates via pkg_version and security problems via portaudit (if it exists).
If you start it with the name of a jail as parameter it will check the
jail for updates and security problems. This is done via jexec so you
need sudo installed if you call the Nagios plugin with an unprivileged
user.

Some problems still exist:
- sometimes there is an plugin timeout in Nagios, because calling
pkg_version can be time consuming
- it is not the best idea to give an unprivileged superuser access to
jexec without password

The plugin works for me at the moment. Hope it will work for you, too. I
would be happy if you have any suggestions or improvements.

Matthias

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] Plugin for monitoring FreeBSD for updates (like check_apt)?

2007-11-13 Thread Matthias Kellermann
Brian A. Seklecki schrieb:
> On Mon, 2007-11-12 at 16:42 +0100, Matthias Kellermann wrote:
>> Hi list,
>>
>> anyone knows of a Nagios plugin to check the FreeBSD ports and base
>> system for updates? I'm searching for something like check_apt for
>> Debian/Ubuntu.
> 
> All that you need to do is exec portaudit and trap the output.  However,
> mapping this into warn/crit status will get tricky.
> 
> Most big shops have software release engineer processes that prevent
> them from, as a NetBSD friend of mine calls it, "implementing massive
> rolling in-place binary upgrades".
> 
> In the hope that security will somehow be derived from that (Linux
> credo, I suppose).  I like the idea ether way.  Let me know if you need
> help testing/coding.
> 
> ~BAS
> 
> $ pkg_version -vL "="
>  apache-2.2.4_2   <   needs updating (port has 2.2.6_2)
>  apr-nothr-db4-1.0.1_1<   needs updating (port has 1.2.8_2)
>  arj-3.10.22  <   needs updating (port has 3.10.22_1)
>  autoconf-2.59_3  <   needs updating (port has 2.61_2)
>  autoconf-wrapper-20070404<   needs updating (port has 20071109)
> 
> $ sudo portaudit
>  Affected package: perl-5.8.8
>  Type of problem: perl -- regular expressions unicode data buffer  
>  overflow. Reference:    
>  Affected package: nagios-plugins-1.4.9,1
>  Type of problem: nagios-plugins -- Long Location Header Buffer
>  Overflow Vulnerability.
> 
> ~BAS

Thanks for your answer Brian.

I've found ports-mgmt/jailaudit in the Ports. Seems quite useful yet.
I'll see how this tool can help on monitoring the installed ports for
security holes.

Monitoring the jails for updates should work with pkg_version -vL "="

I'll let you know if I've made something useful.

Matthias

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] Plugin for monitoring FreeBSD for updates (like check_apt)?

2007-11-13 Thread Brian A. Seklecki

On Mon, 2007-11-12 at 16:42 +0100, Matthias Kellermann wrote:
> Hi list,
> 
> anyone knows of a Nagios plugin to check the FreeBSD ports and base
> system for updates? I'm searching for something like check_apt for
> Debian/Ubuntu.

All that you need to do is exec portaudit and trap the output.  However,
mapping this into warn/crit status will get tricky.

Most big shops have software release engineer processes that prevent
them from, as a NetBSD friend of mine calls it, "implementing massive
rolling in-place binary upgrades".

In the hope that security will somehow be derived from that (Linux
credo, I suppose).  I like the idea ether way.  Let me know if you need
help testing/coding.

~BAS

$ pkg_version -vL "="
 apache-2.2.4_2   <   needs updating (port has 2.2.6_2)
 apr-nothr-db4-1.0.1_1<   needs updating (port has 1.2.8_2)
 arj-3.10.22  <   needs updating (port has 3.10.22_1)
 autoconf-2.59_3  <   needs updating (port has 2.61_2)
 autoconf-wrapper-20070404<   needs updating (port has 20071109)

$ sudo portaudit
 Affected package: perl-5.8.8
 Type of problem: perl -- regular expressions unicode data buffer  
 overflow. Reference:    
> One important thing is that I also want to monitor all the FreeBSD jails
> for updates, too. Any help/hint appreciated :)
> 
> Matthias
> 
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> Nagios-users mailing list
> Nagios-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting 
> any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 
> 
> 
> 
> 
> 


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] Plugin for monitoring FreeBSD for updates (like check_apt)?

2007-11-13 Thread Michael W. Lucas
On Tue, Nov 13, 2007 at 08:06:08AM +0100, Matthias Kellermann wrote:
> Michael W. Lucas schrieb:
> > On Mon, Nov 12, 2007 at 04:42:40PM +0100, Matthias Kellermann wrote:
> >> Hi list,
> >>
> >> anyone knows of a Nagios plugin to check the FreeBSD ports and base
> >> system for updates? I'm searching for something like check_apt for
> >> Debian/Ubuntu.
> >>
> >> One important thing is that I also want to monitor all the FreeBSD jails
> >> for updates, too. Any help/hint appreciated :)
> > 
> > None exists today.
> > 
> > It should be fairly simple to write a NRPE wrapper around portmaster,
> > however.
> > 
> > I believe (but might be wrong) that net-snmp also has the ability to
> > read the FreeBSD package database; you could run a snmpwalk on the
> > target machine and compare that to a master package database.
> > 
> > Good luck, and if you implement something be sure to let us know about it.
> 
> Thanks for your answer Michael. I will see what I can do. If I have
> found/implemented something useful I will let you know.
> 
> BTW: Looking forward for your new book coming out these days. Hope it
> will be released in Europe also on November 14th :)

The book physically exists, and is being shipped to stores now.  You
should be able to find it any day now.

I really need to change my .sig...

==ml
-- 
Michael W. Lucas[EMAIL PROTECTED], [EMAIL PROTECTED]
http://www.BlackHelicopters.org/~mwlucas/
  Coming Soon: "Absolute FreeBSD" -- http://www.AbsoluteFreeBSD.com
On 5/4/2007, the TSA kept 3 pairs of my soiled undies "for security reasons."

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] Plugin for monitoring FreeBSD for updates (like check_apt)?

2007-11-12 Thread Matthias Kellermann
Michael W. Lucas schrieb:
> On Mon, Nov 12, 2007 at 04:42:40PM +0100, Matthias Kellermann wrote:
>> Hi list,
>>
>> anyone knows of a Nagios plugin to check the FreeBSD ports and base
>> system for updates? I'm searching for something like check_apt for
>> Debian/Ubuntu.
>>
>> One important thing is that I also want to monitor all the FreeBSD jails
>> for updates, too. Any help/hint appreciated :)
> 
> None exists today.
> 
> It should be fairly simple to write a NRPE wrapper around portmaster,
> however.
> 
> I believe (but might be wrong) that net-snmp also has the ability to
> read the FreeBSD package database; you could run a snmpwalk on the
> target machine and compare that to a master package database.
> 
> Good luck, and if you implement something be sure to let us know about it.

Thanks for your answer Michael. I will see what I can do. If I have
found/implemented something useful I will let you know.

BTW: Looking forward for your new book coming out these days. Hope it
will be released in Europe also on November 14th :)

Matthias

> ==ml

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


Re: [Nagios-users] Plugin for monitoring FreeBSD for updates (like check_apt)?

2007-11-12 Thread Michael W. Lucas
On Mon, Nov 12, 2007 at 04:42:40PM +0100, Matthias Kellermann wrote:
> Hi list,
> 
> anyone knows of a Nagios plugin to check the FreeBSD ports and base
> system for updates? I'm searching for something like check_apt for
> Debian/Ubuntu.
> 
> One important thing is that I also want to monitor all the FreeBSD jails
> for updates, too. Any help/hint appreciated :)

None exists today.

It should be fairly simple to write a NRPE wrapper around portmaster,
however.

I believe (but might be wrong) that net-snmp also has the ability to
read the FreeBSD package database; you could run a snmpwalk on the
target machine and compare that to a master package database.

Good luck, and if you implement something be sure to let us know about it.

==ml

> 
> Matthias
> 
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> Nagios-users mailing list
> Nagios-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting 
> any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null

-- 
Michael W. Lucas[EMAIL PROTECTED], [EMAIL PROTECTED]
http://www.BlackHelicopters.org/~mwlucas/
  Coming Soon: "Absolute FreeBSD" -- http://www.AbsoluteFreeBSD.com
On 5/4/2007, the TSA kept 3 pairs of my soiled undies "for security reasons."

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


[Nagios-users] Plugin for monitoring FreeBSD for updates (like check_apt)?

2007-11-12 Thread Matthias Kellermann
Hi list,

anyone knows of a Nagios plugin to check the FreeBSD ports and base
system for updates? I'm searching for something like check_apt for
Debian/Ubuntu.

One important thing is that I also want to monitor all the FreeBSD jails
for updates, too. Any help/hint appreciated :)

Matthias

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting 
any issue. 
::: Messages without supporting info will risk being sent to /dev/null