Page 1 of 1

Return code of 126 is out of bounds - plugin may not be exec

Posted: Sun Aug 12, 2012 9:48 am
by Cobalt60
Hi everyone,

I'm setting up a new nagios install and am experiancing the error "Return code of 126 is out of bounds - plugin may not be executable" when nagios runs the perl script check_snmp_storage.pl. Reasearch on the error sugests a permission error, but the script appears to run correctly under both root and nagios users.

Script Permissions:

Code: Select all

-rwxr-xr-x. 1 nagios nagios 25522 Aug  9 18:09 ./check_snmp_storage.pl
Command.cfg snippet:

Code: Select all

define command{
        command_name check_snmp_storage_test
        command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C public -m $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
}
Services.cfg snippet:

Code: Select all

define service {
        use                     generic-service
        hostgroup_name          windows-servers
        service_description     TEST SNMP Storage
        check_command           check_snmp_storage_test!"^/[C,D,E]"!80!90!
}
If you require any further details please ask.