Sticky alerts

Jaap Hogenberg jaap.hogenberg at marketxs.com
Wed Sep 15 15:47:49 CEST 2004


Stephen,

I've come across this problem too and have a nice solution:
I'm not using nsca but run my checks actively but the solution may be
similar.

I've written an service event handler script that disables further
service checks once a non-OK state was received. The script also 
puts a comment on that service stating that the error needs to be
resolved and than the service checks should be re-enabled manually.

You could do similar, use the command file interface to disable the
accepting of further passive check results for the service, and 
have it manually enabled once the error has been solved.

I've attached (the very basic) script that I use.
To use it you need to create an entry in misccommands.cfg that
looks like this:

define command {
command_name    disable_checks
command_line    /opt/nagios/bin/eventhandlers/disable_when_not_ok.sh \
$SERVICEDESC$ $HOSTNAME$ $SERVICESTATE$   }

and add the eventhandler "disable_checks" to the service in your
services.cfg file

Regards
Jaap

On Mon, 2004-09-13 at 05:54, Stephen Farrugia wrote:
> Hi All,
> 
> I'm new to Nagios and am enjoying the monitoring capabilities it offers
> that allows me to keep an eye on a small setup I have.
> 
> I am running nagios-1.2 and plugins-1.4a on Linux (Gentoo).  I have compiled
> Nagios myself, not through the Gentoo portage system.  I also have nrpe and
> nsca successfully running across a small network of machines and it all works
> well.
> 
> One piece of functionality I have is a bit of passive monitoring of log files
> using fetchlog, and this is where I have a problem.  I would like any alert
> raised while monitoring log files to remain sticky until the person monitoring
> acknowledges the alert.  At the moment, fetchlog raises an alert and sends
> it to the central Nagios server using send_nsca, but on the next cycle, it
> send an all clear, so the person monitoring alerts would see the alert go
> away.  This is undesirable behaviour for me as I would like the alert to
> remain until acknowledged.
> 
> I've looked through the doco, and searched through the mailing lists, but
> have be unable to find an answer.  Maybe the answer is there but I didn't
> see it for what it was.  In any case, I would appreciate a bit of guidance
> with this problem.
> 
> Many regards
> Stephen
> 
> 
> -------------------------------------------------------
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: disable_when_not_ok.sh
Type: text/x-sh
Size: 332 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040915/e857c396/attachment.sh>


More information about the Users mailing list