[Nagiosplug-devel] Log Status Checking

Charles H. Baker cbaker at windstream.com
Wed May 5 19:27:44 CEST 2010


I prefer check_logfiles: 

http://labs.consol.de/lang/en/nagios/check_logfiles/

On Wed, 2010-05-05 at 10:21 -0700, Brian Milnes wrote:
> Folks,
> 
>  I've got some difficulty with the way(s) that I can get Nagios to
> perform log status checking.
> Can someone please validate or refute my current setup.
> 
> a) I need to check logs for the presence of every FATAL and ERROR.
> b) check_log (and similar) will do this but
> 
> c) check_log keeps state by copying the entire log (into something
> like X.log.old) which
>      wastes time and money (if you're in the cloud and paying for IO)
> d) when check_log returns other than OK, nagios rechecks and then
> check_log thinks
>      "I've read the whole log, remembered that I'm past that last
> ERROR, so I'm OK now"
>    and I don't get my page.
> e) If I set the check's retry to 1 to work around this,  and I miss a
> socket connection, for whatever reason
>   then I'm going to get a night time page on my FATAL checker.
> 
>  For other monitoring systems I've built a C program that ran like this:
>  check_log_smart -S <SEQUENCE_NUMBER> -L logfile -T statefile -P
> APATTERN -P ANOTHERPATTERN
>  where statefile= <BYTELASTREAD,LAST_SEQUENCE_NUMBER>.
> 
>  Can Nagios send along a sequence number? Does anyone have a smarter
> NRPE plugin for this?
> 
> Thanks, Brian Milnes
-- 
Charles H. Baker, Unix System Administration
Windstream Communications
Charles.Baker at windstream.com | 864.331.7896 | 864.990.1297
Risk! Risk anything! Care no more for the opinion of others, for those
voices. Do the hardest thing on earth for you. Act for yourself. Face
the truth. Katherine Mansfield




More information about the Devel mailing list