service event handler not called on "OK" event

Thomas Hager duke at sigsegv.at
Wed May 23 15:29:09 CEST 2007


hi,

i'm testing event handlers on my nagios box (running 2.9) and ran into
the following problem today:

i configured nagios to run event handlers, added an event handler
command and configured a test service with event handlers enabled.
the event handler command is a simple script, which currently takes
all command line arguments and writes them to a log file, like so:

#!/bin/sh

echo $@ >> /tmp/muh.log

so, nothing error prone here.

the test service checks SSH connectivity to a remote server.

now, if i shutdown the SSH service on the remote server, nagios logs the
CRITICAL events (2x SOFT, the 3rd time HARD), logs the execution of the
event handler and runs the event handler script, which in turn logs the
command line args to the log file. that's the expected behaviour.

but, if a start the SSH service again, nagios logs the OK event, logs
the execution of the event handler but does not run the event handler
script, because nothing is logged to the /tmp/muh.log logfile.

nagios' syslog:

nagios: SERVICE ALERT: server1;SSH;CRITICAL;SOFT;1;Connection refused
nagios: SERVICE EVENT HANDLER: server1;SSH;CRITICAL;SOFT;1;service2tec
nagios: SERVICE ALERT: server1;SSH;CRITICAL;SOFT;2;Connection refused
nagios: SERVICE EVENT HANDLER: server1;SSH;CRITICAL;SOFT;2;service2tec
nagios: SERVICE ALERT: server1;SSH;CRITICAL;HARD;3;Connection refused
nagios: SERVICE EVENT HANDLER: server1;SSH;CRITICAL;HARD;3;service2tec
nagios: SERVICE ALERT: server1;SSH;OK;HARD;3;SSH OK - OpenSSH_4.1
(protocol 1.99)
nagios: SERVICE EVENT HANDLER: server1;SSH;OK;HARD;3;service2tec

well, that's where i'm stuck. all CRITICAL events are logged and
executed, but the OK event is just logged, not executed.

any hints?

tia,
tom.

-- 
Thomas "Duke" Hager                               duke at sigsegv.at
GPG: 1024D/D27F858C            http://www.sigsegv.at/gpg/duke.gpg
=================================================================
"Never Underestimate the Power of Stupid People in Large Groups."

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070523/bf342771/attachment.sig>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-------------- next part --------------
_______________________________________________
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