Alarms for log files

Andreas Ericsson ae at op5.se
Fri Sep 10 13:24:21 CEST 2004


Anton Krall wrote:
> Is there any way to configure a script for checking the logfiles every X
> minutes and if the word error is found, send out an alarm?
> 
> Ive thought this thru and so far seems difficult since if the word error is
> found, the alarm will go off but even after correcting the problem, the
> alarm would still go off since the word error would still be on the logfile.
> 
 > Any ideas?
 >

Use check_log2.pl, which maintains state through scans and only scans 
new lines. Remember so set max_check_attempts to 1 if you do, since it 
will never reach critical otherwise.

An alternative would be to truncate the logfile for every pass, but then 
you would need to duplicate them by some other means.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list