<br>Yes, the event handler works now. But it still reports "null" in the nagios.log, not its real values.<br><br>server.com;(null);(null);(null);http-host-event<br><br><br>- Chanchal<br><br><div class="gmail_quote">
On Sat, May 3, 2008 at 5:02 PM, Thomas Guyot-Sionnest <<a href="mailto:dermoth@aei.ca">dermoth@aei.ca</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<div><div></div><div class="Wj3C7c"><br>
On 03/05/08 12:42 PM, Chanchal James wrote:<br>
> Hi,<br>
><br>
> I have a bash script set up to run as an event handler. The command I<br>
> defined in commands.cfg is:<br>
><br>
> define command{<br>
>         command_name    http-host-event<br>
>         command_line<br>
> /usr/local/nagios/libexec/eventhandlers/http_host_event $HOSTNAME$<br>
> $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$<br>
>         }<br>
><br>
><br>
> I have it configured to run for SOFT Host down. But it doesnt seem to be<br>
> running from nagios. This is what the nagios error log shows:<br>
><br>
> [1209832148] HOST EVENT HANDLER:<br>
> server.com;(null);(null);(null);http-host-event<br>
><br>
> But if I run "/usr/local/nagios/libexec/eventhandlers/http_host_event<br>
> $HOSTNAME$ $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$" from<br>
> shell with the macros substituted with the actual value, it works.<br>
<br>
</div></div>This was discussed on IRC. I believe the event-handler works now (was<br>
using SERVICE* macros instead of HOST*), however the log line is still<br>
showing NULLs:<br>
<div class="Ih2E3d"><br>
HOST EVENT HANDLER: server.com;(null);(null);(null);http-host-event<br>
<br>
</div>Since it's using the same method to print those macros all over the<br>
place (an extern int*) I'd guess it affects all event handlers (only the<br>
log, the command is expanded properly). The log line shown above comes<br>
from base/sehandlers.c:590.<br>
<br>
<br>
Thomas<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.6 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org" target="_blank">http://enigmail.mozdev.org</a><br>
<br>
iD8DBQFIHOER6dZ+Kt5BchYRAq11AKDSk4fnbNoNkkEgqIi+V6bNnUgU/QCfT8/C<br>
/uWkBq82mBUS+u5owMLdJBs=<br>
=bCjO<br>
-----END PGP SIGNATURE-----<br>
<br>
-------------------------------------------------------------------------<br>
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference<br>
Don't miss this year's exciting event. There's still time to save $100.<br>
Use priority code J8TL2D2.<br>
<a href="http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone" target="_blank">http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone</a><br>
_______________________________________________<br>
Nagios-devel mailing list<br>
<a href="mailto:Nagios-devel@lists.sourceforge.net">Nagios-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-devel</a><br>
</blockquote></div><br>