Event Handlers

Chris Purcell nagios at cjp.us
Thu Jul 22 18:34:10 CEST 2004


Pete Dewell said:
> Try getting the handler to return some text on completion - say "Done"
> or "Failed". I had a similar problem, resolved when the handler returns
> a bit of text. It isn't used/displayed anywhere, but it does seem to
> help.

I'm a bit confused, where should I display the text?  To the console?  I
tried that, but I don't see the "Done" or "Failed" messages on the console
or in the logs.

#!/bin/bash
echo "nagios event handler" > /home/nagios/anagiosevent
STAT=$?
if [ $STAT = 0 ]
then
echo "Done"
else
echo "Failed"
fi

The only thing I see in /usr/local/nagios/var/nagios.log (and
/var/log/messages) is this...

[1090514070] HOST ALERT: fake_server;DOWN;SOFT;8;CRITICAL - Plugin timed
out after 10 seconds
[1090514080] HOST ALERT: fake_server;DOWN;SOFT;9;CRITICAL - Plugin timed
out after 10 seconds
[1090514090] HOST ALERT: fake_server;DOWN;HARD;10;CRITICAL - Plugin timed
out after 10 seconds
[1090514090] HOST NOTIFICATION:
sysadmin;fake_server;DOWN;host-notify-by-email;CRITICAL - Plugin timed out
after 10 seconds
[1090514092] SERVICE ALERT: fake_server;PING;CRITICAL;HARD;1;CRITICAL -
Plugin timed out after 10 seconds


Thanks,
Chris






-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list