SERVICE EVENTHANDLER job 96 from worker Core Worker 22957 is

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
arushgiri
Posts: 3
Joined: Wed Sep 10, 2014 11:54 pm

SERVICE EVENTHANDLER job 96 from worker Core Worker 22957 is

Post by arushgiri »

i am getting below error while running event handler on Nagios core:

[1410418646] SERVICE EVENT HANDLER: eej758;Remote check disk;CRITICAL;SOFT;1;myhandler
[1410418646] wproc: SERVICE EVENTHANDLER job 96 from worker Core Worker 22957 is a non-check helper but exited with return code 2

can anyone help me with this issue?
emislivec
Posts: 52
Joined: Tue Feb 25, 2014 10:06 am

Re: SERVICE EVENTHANDLER job 96 from worker Core Worker 2295

Post by emislivec »

arushgiri wrote:[1410418646] wproc: SERVICE EVENTHANDLER job 96 from worker Core Worker 22957 is a non-check helper but exited with return code 2
This usually means a script/executable in the command_line of the eventhandler command definition can't be found (Edit: or the command isn't a valid shell command, check for typos, missing quotes, unescaped special characters). It's a good idea to use the full path to scripts, you can use the $USER1$ macro for executables in /usr/local/nagios/libexec. On my test system I have an eventhandler command defined like this:

Code: Select all

define command {
    command_name service-event-handler-command
    command_line $USER1$/eventhandlers/service-event-handler $HOSTNAME$ $HOSTDISPLAYNAME$ $HOSTADDRESS$ $SERVICEDESC$ $SERVICEDISPLAYNAME$ $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$
}
Can you post the command definition you're using?
arushgiri
Posts: 3
Joined: Wed Sep 10, 2014 11:54 pm

Re: SERVICE EVENTHANDLER job 96 from worker Core Worker 2295

Post by arushgiri »

Thanks for reply. this is the command definition m using:

define command{
command_name myhandler
command_line /usr/local/nagios/libexec/eventhandlers/myhandler.sh $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$
}
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SERVICE EVENTHANDLER job 96 from worker Core Worker 2295

Post by lmiltchev »

What are the permissions of the script?

Code: Select all

ls -la /usr/local/nagios/libexec/eventhandlers/myhandler.sh
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked