Hello Support,
Please let me how can i start a new topic.
Akhil
NOOB: (Return code of 127 is out of bounds - plugin may be
-
- Posts: 1
- Joined: Mon Apr 11, 2016 3:54 pm
Re: NOOB: (Return code of 127 is out of bounds - plugin may
From the forum topic listing page:
Former Nagios employee
Re: NOOB: (Return code of 127 is out of bounds - plugin may
The plugin ownership of root:root is the same for all other plugins in the folder.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NOOB: (Return code of 127 is out of bounds - plugin may
The nagios user the one that does the actual executing, which is different from the root user.
What happens when you execute these commands:
What happens when you execute these commands:
Code: Select all
su nagios
/usr/lib/nagios/plugins/check_snmp_printer.sh -H 192.1.1.152 -C public -x MODEL
rkennedy wrote:For reference, did you follow some sort of guide when installing your plugins?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NOOB: (Return code of 127 is out of bounds - plugin may
root@apollo:~# su nagios
root@apollo:~# /usr/lib/nagios/plugins/check_snmp_printer.sh -H 192.1.1.152 -C public -x MODEL
"HP LaserJet M402dn", Serial # XXXXXXXXXX
root@apollo:~#
When installing the plugin I simply downloaded the bash script from the website, copied it into the plugins folder and set the permissions to match the other files in the folder.
root@apollo:~# /usr/lib/nagios/plugins/check_snmp_printer.sh -H 192.1.1.152 -C public -x MODEL
"HP LaserJet M402dn", Serial # XXXXXXXXXX
root@apollo:~#
When installing the plugin I simply downloaded the bash script from the website, copied it into the plugins folder and set the permissions to match the other files in the folder.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NOOB: (Return code of 127 is out of bounds - plugin may
McHenry wrote:Code: Select all
define command{ command_name check_printers command_line $USER1$/check_snmp_printer -H $HOSTADDRESS$ -C $ARG1$ -x $ARG2$ -w $ARG3$ -c $ARG4$ }
Here is your problem, in your command definition the name of the plugin is missing the .sh from end, it should be:McHenry wrote:When installing the plugin I simply downloaded the bash script from the website, copied it into the plugins folder and set the permissions to match the other files in the folder.Code: Select all
root@apollo:~# su nagios root@apollo:~# /usr/lib/nagios/plugins/check_snmp_printer.sh -H 192.1.1.152 -C public -x MODEL "HP LaserJet M402dn", Serial # XXXXXXXXXX root@apollo:~#
Code: Select all
define command{
command_name check_printers
command_line $USER1$/check_snmp_printer.sh -H $HOSTADDRESS$ -C $ARG1$ -x $ARG2$ -w $ARG3$ -c $ARG4$
}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NOOB: (Return code of 127 is out of bounds - plugin may
Awesome, thank you.
I copied the original command from the Nagios website so I'm surprised others have not noted this problem:
https://exchange.nagios.org/directory/P ... 1458605971
I copied the original command from the Nagios website so I'm surprised others have not noted this problem:
https://exchange.nagios.org/directory/P ... 1458605971
Re: NOOB: (Return code of 127 is out of bounds - plugin may
The script there is actually uploaded without the .sh extension. It will work either way, though.
Going to mark this thread as resolved, and close it up.
Going to mark this thread as resolved, and close it up.
Former Nagios Employee