[Nagios-devel] Making passive checks notify like active

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Making passive checks notify like active

Post by Guest »

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!






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked