Page 1 of 1

[Nagios-devel] event handler not working

Posted: Fri Dec 09, 2005 8:36 pm
by Guest
Hello,

I am a newbie to the Nagios community. I developed an event handler for
Nagios, but somehow it doesn't seem to be working. Here's the command
definition for the event handler:

define command {
command_name fix_taosvcs
command_line /opt/nagios/libexec/wpj/tao_event_handler
$SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $SERVICEOUTPUT$
2>/dev/null
}

If I ran the program separately such as the following, it works fine:
/opt/nagios/libexec/wpj/tao_event_handle CRITICAL HARD 4 "CRITICAL Level 0 -
0 warning[] - 1 critical[PbxCmdMgr/0]"
I tried running the program as nagios user, and it works. So I don't think
it's permission problem. When I looked at the nagios log, it seems to have
called the event handler. Following is the log:

SERVICE ALERT: linux05;CHKTAO;CRITICAL;HARD;4;CRITICAL: Level 2 - 0
warning[] 1 critical[PbxCmdMgr/0]
[1134130290] SERVICE EVENT HANDLER:
linux05;CHKTAO;CRITICAL;HARD;4;fix_taosvcs

However when the program run under Nagios as event handler, it doesn't do
anything. It's very perplexing. I am running Nagios 2.0b3, I am wondering
if this version is too old for some of the macro that I used. In order for
the event handler to do anything meaningful, it needs to have access to the
content of $SERVICEOUTPUT$.

Any advise on how to debug this problem will be greatly appreciated. Thank
you.

Billy







This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]