Return code of 126 is out of bounds - plugin may be missing

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
jereby
Posts: 3
Joined: Wed Mar 21, 2012 3:11 am

Return code of 126 is out of bounds - plugin may be missing

Post by jereby »

Hello.
Im using Debian 6 and installed newest Nagios Core.
I want to monitor disk space of windows host it would be disk C and D. I downloaded 2 plugins from nagios exchange put them into /usr/lib/nagios/plugins/. I defined commands in /etc/nagios3/commands.cfg and it looked like this.

First plugin command defined:

Code: Select all

define command{
command_name check_snmp_disksize
command_line /usr/lib/nagios/plugins/check_snmp_disksize -H $HOSTADDRESS$ -C $ARG1$ -d $ARG2$ -w $ARG3$ -c $ARG4$
}
Second plugin command defined:

Code: Select all

define command{ 
command_name check_disk_snmp 
command_line /usr/lib/nagios/plugins/check_disk_snmp $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ $ARG4$ 
} 
Then i defined service in /etc/nagios3/conf.d/dc.cfg for first plugin it looks like this:

Code: Select all

define service{
       use                     generic-service
       host_name               dc
       service_description     Status C:
       check_command           check_disk_snmp!public!1!80!90
       }

#define service{
       use                     generic-service
       host_name               dc
       service_description     Status D:
       check_command           check_disk_snmp!public!2!80!90
       }

For the second plugin:

Code: Select all

define service{
        use                     generic-service
        host_name               dc
        service_description     Disk check
        check_command           check_snmp_disksize!public!C:!80!90
        }
And i always get Return code of 126 is out of bounds - plugin may be missing message with both plugins. Anyone can help?
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Return code of 126 is out of bounds - plugin may be miss

Post by jsmurphy »

Usually this is a symptom of a. The path being wrong, b. The permissions being wrong or c. the script is failing to execute... in your case I dare say you need to check the permissions of the files, they should be owned by nagios:nagios and ensure they have execute permission.

If not then run the script on the command line manually and ensure it can actually execute and that it's not missing any dependency packages.
Locked