Eventhandler not running : nagios v3.0.1
Thomas Guyot-Sionnest
dermoth at aei.ca
Sun May 4 00:02:57 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/05/08 12:42 PM, Chanchal James wrote:
> Hi,
>
> I have a bash script set up to run as an event handler. The command I
> defined in commands.cfg is:
>
> define command{
> command_name http-host-event
> command_line
> /usr/local/nagios/libexec/eventhandlers/http_host_event $HOSTNAME$
> $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$
> }
>
>
> I have it configured to run for SOFT Host down. But it doesnt seem to be
> running from nagios. This is what the nagios error log shows:
>
> [1209832148] HOST EVENT HANDLER:
> server.com;(null);(null);(null);http-host-event
>
> But if I run "/usr/local/nagios/libexec/eventhandlers/http_host_event
> $HOSTNAME$ $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$" from
> shell with the macros substituted with the actual value, it works.
This was discussed on IRC. I believe the event-handler works now (was
using SERVICE* macros instead of HOST*), however the log line is still
showing NULLs:
HOST EVENT HANDLER: server.com;(null);(null);(null);http-host-event
Since it's using the same method to print those macros all over the
place (an extern int*) I'd guess it affects all event handlers (only the
log, the command is expanded properly). The log line shown above comes
from base/sehandlers.c:590.
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIHOER6dZ+Kt5BchYRAq11AKDSk4fnbNoNkkEgqIi+V6bNnUgU/QCfT8/C
/uWkBq82mBUS+u5owMLdJBs=
=bCjO
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
More information about the Developers
mailing list