255 Out of Bounds
255 Out of Bounds
I run check_iferrors_percent from the command line as root and it executes successfully. I create a service to execute the exact same command and get a return code 255 out of bounds error. I ran chmod 777 on check_iferrors_percent but I still get the same error.
Re: 255 Out of Bounds
Hi hollanro,
Could you please making sure that "check_iferrors_percent" is added to the "nrpe.cfg" (below) on both Nagios XI and nrpe (remote)?
Example of command defined in "/usr/local/nagios/etc/nrpe.cfg":
Also, please make sure that nrpe agent is running.
Best Regards,
Vinh
Could you please making sure that "check_iferrors_percent" is added to the "nrpe.cfg" (below) on both Nagios XI and nrpe (remote)?
Example of command defined in "/usr/local/nagios/etc/nrpe.cfg":
Code: Select all
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -r -w .15,.10,.05 -c .30,.25,.20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
Code: Select all
systemctl status nrpe.service
Vinh
Re: 255 Out of Bounds
This is not using an npre agent, it's using snmp to a network switch.
Re: 255 Out of Bounds
Hi hollanro,
Can you please post the service and commands settings? .... picture would helps.
I need to know how your command is defined and how it is being called in XI.
Also, can I also see the exact error? ..... any helpful details follows the "255 out of bounds".
Since you said that you ran "check_iferrors_percent" from the command line as root and was successful.
Can I also see the exact command for that as well.
Regards,
Vinh
Can you please post the service and commands settings? .... picture would helps.
I need to know how your command is defined and how it is being called in XI.
Also, can I also see the exact error? ..... any helpful details follows the "255 out of bounds".
Since you said that you ran "check_iferrors_percent" from the command line as root and was successful.
Can I also see the exact command for that as well.
Regards,
Vinh
Re: 255 Out of Bounds
Thanks Vinh, I can't do snaps for security reasons but here is what i have:
********** plug-in help **********
Usage: ./check_iferrors_percent -H host [ options ]
Options:
-h, --help
This help message
-m, --morehelp
Detailed help on how to edit Nagios / Icinga configuration files to get this
check working for you
-H --host STRING or IPADDRESS
Check interface on the indicated host.
-C --community STRING
SNMP Community
-i --interface STRING
Interface to examine. If none is specified ALL interfaces will be reported.
-w --warning INTEGER
Percentage of necessary errors since last check to result in warning status (default: 0.75)
-c --critical INTEGER
Percentage of necessary errors since last check to result in critical status (default: 1.00)
-v, --version INTEGER
SNMP version
-s, --username
Set the securityName used for authenticated SNMPv3 communication.
-T, --authpassword
Set the SNMPv3 authentication pass phrase used for authenticated SNMPv3 communication.
-t, --authprotocol
Set the authentication protocol (MD5 or SHA) used for authenticated SNMPv3
communication.
-X, --privpassword
Set the privacy pass phrase used for encrypted SNMPv3 communication.
-x, --privprotocolnagios xi service
Set the privacy protocol (DES or AES) used for encrypted SNMPv3 communication.
********** command line as root **********
libexec]# ./check_iferrors_percent -H xx.xx.xxx.xx -v 3 -s xxxxx -T xxxxxxxx -t MD5
IFERRORS OK - Interface error rates for host xx.xx.xxx.xx | chassis_out_discards
=0%;0.0075;0.01 chassis_in_discards=0%;0.0075;0.01 chassis_out_errors=0%;0.0075;
0.01 chassis_in_errors=0%;0.0075;0.01 eth0_out_discards=0%;0.0075;0.01 eth0_in_d
iscards=0%;0.0075;0.01 eth0_out_errors=0%;0.0075;0.01 eth0_in_errors=0%;0.0075;0
.01 eth1_out_discards=0%;0.0075;0.01 eth1_in_discards=0%;0.0075;0.01 eth1_out_er
rors=0%;0.0075;0.01 eth1_in_errors=0%;0.0075;0.01 eth2_out_discards=0%;0.0075;0.
01 eth2_in_discards=0%;0.0075;0.01 eth2_out_errors=0%;0.0075;0.01 eth2_in_errors
=0%;0.0075;0.01 eth3_out_discards=0%;0.0075;0.01 etc...
********** nagios xi service **********
$USER1$/check_iferrors_percent -H $HOSTADDRESS$ $ARG1$
$ARG1$ -v 3 -s xxxxx -T xxxxxxxx -t MD5
********** output from nagios service status **********
(Return code of 255 for service 'Interface Errors' on host 'xxxxxxxxxxxx' was out of bounds)
********** plug-in help **********
Usage: ./check_iferrors_percent -H host [ options ]
Options:
-h, --help
This help message
-m, --morehelp
Detailed help on how to edit Nagios / Icinga configuration files to get this
check working for you
-H --host STRING or IPADDRESS
Check interface on the indicated host.
-C --community STRING
SNMP Community
-i --interface STRING
Interface to examine. If none is specified ALL interfaces will be reported.
-w --warning INTEGER
Percentage of necessary errors since last check to result in warning status (default: 0.75)
-c --critical INTEGER
Percentage of necessary errors since last check to result in critical status (default: 1.00)
-v, --version INTEGER
SNMP version
-s, --username
Set the securityName used for authenticated SNMPv3 communication.
-T, --authpassword
Set the SNMPv3 authentication pass phrase used for authenticated SNMPv3 communication.
-t, --authprotocol
Set the authentication protocol (MD5 or SHA) used for authenticated SNMPv3
communication.
-X, --privpassword
Set the privacy pass phrase used for encrypted SNMPv3 communication.
-x, --privprotocolnagios xi service
Set the privacy protocol (DES or AES) used for encrypted SNMPv3 communication.
********** command line as root **********
libexec]# ./check_iferrors_percent -H xx.xx.xxx.xx -v 3 -s xxxxx -T xxxxxxxx -t MD5
IFERRORS OK - Interface error rates for host xx.xx.xxx.xx | chassis_out_discards
=0%;0.0075;0.01 chassis_in_discards=0%;0.0075;0.01 chassis_out_errors=0%;0.0075;
0.01 chassis_in_errors=0%;0.0075;0.01 eth0_out_discards=0%;0.0075;0.01 eth0_in_d
iscards=0%;0.0075;0.01 eth0_out_errors=0%;0.0075;0.01 eth0_in_errors=0%;0.0075;0
.01 eth1_out_discards=0%;0.0075;0.01 eth1_in_discards=0%;0.0075;0.01 eth1_out_er
rors=0%;0.0075;0.01 eth1_in_errors=0%;0.0075;0.01 eth2_out_discards=0%;0.0075;0.
01 eth2_in_discards=0%;0.0075;0.01 eth2_out_errors=0%;0.0075;0.01 eth2_in_errors
=0%;0.0075;0.01 eth3_out_discards=0%;0.0075;0.01 etc...
********** nagios xi service **********
$USER1$/check_iferrors_percent -H $HOSTADDRESS$ $ARG1$
$ARG1$ -v 3 -s xxxxx -T xxxxxxxx -t MD5
********** output from nagios service status **********
(Return code of 255 for service 'Interface Errors' on host 'xxxxxxxxxxxx' was out of bounds)
Re: 255 Out of Bounds
Hi hollanro,
Since you were able to run this command manually on the command line, I'm guessing that you could try adding a single quote to your ARGV or break them down to smaller value ..... like using "-v $ARG1$ -s $ARG2$ -T $ARG4$ -t $ARGV4$" for example.
To do that, you will have to change the definition of the command inside the "commands.cfg" file first.
Here's an example: Can you please show me (upload) the contents inside the service config file for this service?
Also, can you please show me (upload) the "commands.cfg" file?
Regards,
Vinh
Since you were able to run this command manually on the command line, I'm guessing that you could try adding a single quote to your ARGV or break them down to smaller value ..... like using "-v $ARG1$ -s $ARG2$ -T $ARG4$ -t $ARGV4$" for example.
To do that, you will have to change the definition of the command inside the "commands.cfg" file first.
Here's an example: Can you please show me (upload) the contents inside the service config file for this service?
Code: Select all
/usr/local/nagios/etc/services/<your hostname>.cfg
Code: Select all
/usr/local/nagios/etc/commands.cfg
Vinh
You do not have the required permissions to view the files attached to this post.
Re: 255 Out of Bounds
I was able to resolve...i was running the command from the command line using root not realizing that the check stores data in a temp file. Once i moved it to Nagios to run as a service the check did not have access to the temp data. I just deleted the temp data files from the command line run and reran the Nagios check and everything worked. Thanks for all of your help Vinh!
Re: 255 Out of Bounds
Hi hollanro,
Great!! .... I will lock/close the post/ticket ...
Regards,
Vinh
Great!! .... I will lock/close the post/ticket ...
Regards,
Vinh