Page 1 of 1

Return code of 127 for check of service ... was out of bound

Posted: Tue Mar 29, 2011 2:57 am
by TSCAdmin
I have just installed a custom plugin and I keep on getting "Make sure the plugin you're trying to run actually exists".

Below is my command definition
command definition.PNG

Following is the service definition
service definition.PNG

Even more evidence that the plugin does exist

Code: Select all

$ ls -l /usr/local/nagios/libexec/Automation/check_linux_uptime
-rwxr-xr-x 1 nagios nagios 1063 Mar 29 03:34 /usr/local/nagios/libexec/Automation/check_linux_uptime


$ file /usr/local/nagios/libexec/Automation/check_linux_uptime
/usr/local/nagios/libexec/Automation/check_linux_uptime: Korn shell script text executable


$ /usr/local/nagios/libexec/Automation/check_linux_uptime duk1srv0150
Uptime check for host duk1srv0150 completed with status COMPLETED

I could not figure out why it is complaining that the plugin does not exist. Am I missing something?

Re: Return code of 127 for check of service ... was out of b

Posted: Tue Mar 29, 2011 6:14 am
by jtata
EDIT - sorry I just noticed that you can run the plugin manually. Does it return an exit code? You should also be able to run

Code: Select all

echo $?
immediately after running the command and get either 0, 1 or 2. Most of the time when I see the 127 error its because the plugin in question is not returning one of the expected exit code values.

Re: Return code of 127 for check of service ... was out of b

Posted: Tue Mar 29, 2011 8:07 am
by TSCAdmin
yes, jtata, it does return the exit code. thanks.

Re: Return code of 127 for check of service ... was out of b

Posted: Tue Mar 29, 2011 8:18 am
by jtata
The only other thing that stands out is your command definition is passing $HOSTADDRESS$ which is usually an IP or FQDN. In your example execution it looks like you are passing a host name only (duk1srv0150). Some other plugins (check_http for example) need you to supply an argument switch to tell them if you are using an IP address. I don't know if that is the case with this one, is this plugin from the exchange or was it created internally?

Re: Return code of 127 for check of service ... was out of b

Posted: Tue Mar 29, 2011 9:21 am
by tonyyarusso
In your pasted output above, are you running the plugin as the nagios user? What exit code did it have then?

Re: Return code of 127 for check of service ... was out of b

Posted: Mon Apr 04, 2011 5:36 am
by TSCAdmin
Thank you guys for your suggestions. I stopped and started Nagios and MySQL service and it worked. Funny but true. I wish I would be the last person to see this miracle though :)

Re: Return code of 127 for check of service ... was out of b

Posted: Mon Apr 04, 2011 9:43 am
by rdedon
Just contact us again if you have any questions or need any assistance.

Thanks!