Making passive checks notify like active checks--race condition?

Mark Plaksin happy at usg.edu
Thu Aug 31 17:43:35 CEST 2006


We want our passive checks to notify like active checks.  What if we make a
plugin which does nothing but report the current state (and description) of
a service?  Define it like this in checkcommands.cfg:
define command{
    command_name   repeater
    command_line   $USER1$/repeater_homebrew $SERVICESTATEID$ $SERVICEOUTPUT$
}

and the plugin itself is brain dead:
--------------------
#!/bin/sh

exit=$1
shift

echo $*
exit $exit
--------------------

We run this plugin as an *active* check so that we get the notification
behavior we want and then a passive check to actually check the service and
submit results.

Are there any problems with this?  It seems like there could be a race
condition in which the active check starts running, the passive check
submits results that for the service that indicate a state change, and then
the active check returns its results and nobody ever knows about the state
change the passive check was trying to report.

It seems to depend on how Nagios is coded.  I know a little C but I'm sure
it would take me a long long time to figure out this detail :)

Thanks!  And Thanks for Nagios which is awesome!


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Developers mailing list