[Nagiosplug-help] event handler not running

Mike Loud mike.loud at comandsolutions.com
Thu Feb 3 23:11:06 CET 2011


When executing command manually I get this

/usr/local/nagios/libexec/check_nrpe -H 10.231.xxx.133 -c myhandler CRITICAL 
HARD
NRPE: Unable to read output

the service is:

define service {
use generic-service
host_name mikel2
service_description SSH
event_handler my_eventhandler!$SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$
check_command check_nrpe!check_ssh
}

it shows in nagios event log that it tries to run the event handler:
[02-03-2011 16:57:58] SERVICE EVENT HANDLER: 
mikel2;SSH;OK;HARD;3;my_eventhandler!OK $STATETYPE$ 3


the myhandler on the remote machine points to a simple echo command script

echo ran >> /usr/local/nagios/myeventhandler.log

when I su -m nagios and run the script manually on the remote machine it 
works fine.

When I test a command WITH arguments on the nagios server that works too, so 
I know I have nrpe compiled right with enable arguments. I also have the don’t 
blame option set to 1 on the remote server.

Any ideas why I am getting this?

All other checks and everything work fine, just when trying to run this 
event handler script.

Thanks for any advise.







More information about the Help mailing list