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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
TSCAdmin
Posts: 155
Joined: Wed Apr 14, 2010 3:00 pm
Location: India

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

Post 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?
You do not have the required permissions to view the files attached to this post.
jtata
Posts: 47
Joined: Thu Sep 02, 2010 12:27 pm

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

Post 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.
TSCAdmin
Posts: 155
Joined: Wed Apr 14, 2010 3:00 pm
Location: India

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

Post by TSCAdmin »

yes, jtata, it does return the exit code. thanks.
jtata
Posts: 47
Joined: Thu Sep 02, 2010 12:27 pm

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

Post 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?
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

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

Post by tonyyarusso »

In your pasted output above, are you running the plugin as the nagios user? What exit code did it have then?
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
TSCAdmin
Posts: 155
Joined: Wed Apr 14, 2010 3:00 pm
Location: India

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

Post 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 :)
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

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

Post by rdedon »

Just contact us again if you have any questions or need any assistance.

Thanks!
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
Locked