Page 1 of 1

Re: [Nagios-devel] Eventhandler not running : nagios v3.0.1

Posted: Sat May 03, 2008 2:02 pm
by Guest
-----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 post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]