NOOB: (Return code of 127 is out of bounds - plugin may be
Posted: Sun Apr 10, 2016 2:06 am
I am a new user and have some basic monitoring working. I am interested in getting the following printer plugin working:
https://exchange.nagios.org/directory/P ... ck/details
The response I received for both services is:
"(Return code of 127 is out of bounds - plugin may be missing)"
I have checked the $USER1$ variable to confirm the plugin path:
root@apollo:~# grep "USER1" /etc/nagios3/resource.cfg
# Nagios supports up to 32 $USERx$ macros ($USER1$ through $USER32$)
# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/lib/nagios/plugins
The plugin is located in the correct location:
root@apollo:~# ls -l /usr/lib/nagios/plugins/check_snmp_printer.sh
-rwxr-xr-x 1 root root 32658 Mar 28 12:50 /usr/lib/nagios/plugins/check_snmp_printer.sh
in /etc/nagios3/command.cfg I have the following:
define command{
command_name check_snmp_printer
command_line $USER1$/check_snmp_printer -H $HOSTADDRESS -C $ARG1$ -x $ARG2 -w $ARG3$ -c $ARG4$
}
In /etc/nagios3/objects/printers.cfg I have the following two services defined:
define service{
use generic-service
hostgroups hp-printers ; The name of the host the service is associated with
service_description Toner Supply
check_command check_snmp_printer!public!"CONSUM Toners"!20!10
}
define service{
use generic-service
hostgroups hp-printers ; The name of the host the service is associated with
service_description Paper Supply
check_command check_snmp_printer!public!"TRAY ALL"!25%!0%
}
Any help would be greatly appreciated. Thanks in advance...
https://exchange.nagios.org/directory/P ... ck/details
The response I received for both services is:
"(Return code of 127 is out of bounds - plugin may be missing)"
I have checked the $USER1$ variable to confirm the plugin path:
root@apollo:~# grep "USER1" /etc/nagios3/resource.cfg
# Nagios supports up to 32 $USERx$ macros ($USER1$ through $USER32$)
# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/lib/nagios/plugins
The plugin is located in the correct location:
root@apollo:~# ls -l /usr/lib/nagios/plugins/check_snmp_printer.sh
-rwxr-xr-x 1 root root 32658 Mar 28 12:50 /usr/lib/nagios/plugins/check_snmp_printer.sh
in /etc/nagios3/command.cfg I have the following:
define command{
command_name check_snmp_printer
command_line $USER1$/check_snmp_printer -H $HOSTADDRESS -C $ARG1$ -x $ARG2 -w $ARG3$ -c $ARG4$
}
In /etc/nagios3/objects/printers.cfg I have the following two services defined:
define service{
use generic-service
hostgroups hp-printers ; The name of the host the service is associated with
service_description Toner Supply
check_command check_snmp_printer!public!"CONSUM Toners"!20!10
}
define service{
use generic-service
hostgroups hp-printers ; The name of the host the service is associated with
service_description Paper Supply
check_command check_snmp_printer!public!"TRAY ALL"!25%!0%
}
Any help would be greatly appreciated. Thanks in advance...