CRITICAL;SOFT;9;(Return code of 255 is out of bounds)

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
mkhan12282
Posts: 28
Joined: Sun May 31, 2015 3:02 pm

CRITICAL;SOFT;9;(Return code of 255 is out of bounds)

Post by mkhan12282 »

version running: Nagios® Core™ 4.0.1

Hello everyone

We are getting the following under the "alert history".
We are monitoring ASA 5505 firewall. We checked manually that interfaces are up and not flappping. However nagios reports the following.. i.e screeshot attached.
asa5505.PNG
When i attempt to check interfaces via command line, i get this.
[root@test libexec]# ./check_snmp_int.pl -H 10.10.10.10 -C tiger -2 -n "Adaptive Security Appliance 'INSIDE' interface" -f -s --label -r -g -D -Y -e -k -q -d 300 -u -B -w 98,98,50,50,8000,8000 -c 99,99,500,500,20000,20000
Illegal division by zero at ./check_snmp_int.pl line 639.

If i make command simple, it works.

[root@test libexec]# ./check_snmp_int.pl -H 10.10.10.10 -C tiger -2 -n "Adaptive Security Appliance 'INSIDE' interface"
Adaptive Security Appliance 'INSIDE' interface:UP:1 UP: OK

[root@test libexec]# ./check_snmp_int.pl -H 10.10.10.10 -C tiger -2 -n "Adaptive Security Appliance 'outside' interface"
Adaptive Security Appliance 'outside' interface:UP:1 UP: OK

checkcommands.cfg
define command{
command_name check_snmp_int
command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ -C $ARG2$ -$ARG1$ -n $ARG3$ -f -s --label -r -g -D -Y -e -k -q -d 300 -u -B -w $ARG4$ -c $ARG5$
}

check_snmp_int.pl also attached.

Anyone can please help on this?
Thank you.
Attachments
check_snmp_int.pl
(32.86 KiB) Downloaded 272 times
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: CRITICAL;SOFT;9;(Return code of 255 is out of bounds)

Post by abrist »

Can you pull off command options one by one to locate the problematic argument? Narrowing down the issue will greatly simplify the troubleshooting of the problem.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
mkhan12282
Posts: 28
Joined: Sun May 31, 2015 3:02 pm

Re: CRITICAL;SOFT;9;(Return code of 255 is out of bounds)

Post by mkhan12282 »

Hi Abrist

Good tip, thanks for that.

It seems options -Y -e -k were causing the issue. Nagios showed the following when i didn't include these options (or lease one by one) as below. Without these option, nagios is show interfaces as :UP: 1 UP: OK

[root@test libexec]# ./check_snmp_int.pl -H 10.10.10.10 -C tiger -2 -n "Adaptive Security Appliance 'INSIDE' interface" -f -s --label -r -g -D -Y
Cannot put -Y or -y options without perf check option (-k)

Usage: ./check_snmp_int.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>) [-p <port>] -n <name in desc_oid> [-i -a -D] [-r] [-f[eSyY]] [-k[qBMGu] -g -w<warn levels> -c<crit levels> -d<delta>] [-o <octet_length>] [-t <timeout>] [-s] --label [-V]

[root@test libexec]# ./check_snmp_int.pl -H 10.10.10.10 -C tiger -2 -n "Adaptive Security Appliance 'INSIDE' interface" -f -s --label -r -g -D -Y -e -k
Use of uninitialized value $o_warn_opt in split at ./check_snmp_int.pl line 330.
2 warning levels for bandwidth checks
Usage: ./check_snmp_int.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>) [-p <port>] -n <name in desc_oid> [-i -a -D] [-r] [-f[eSyY]] [-k[qBMGu] -g -w<warn levels> -c<crit levels> -d<delta>] [-o <octet_length>] [-t <timeout>] [-s] --label [-V]

[root@test libexec]# ./check_snmp_int.pl -H 10.10.10.10 -C tiger -2 -n "Adaptive Security Appliance 'INSIDE' interface" -f -s --label -r -g -D -Y -e -k
Use of uninitialized value $o_warn_opt in split at ./check_snmp_int.pl line 330.
2 warning levels for bandwidth checks
Usage: ./check_snmp_int.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>) [-p <port>] -n <name in desc_oid> [-i -a -D] [-r] [-f[eSyY]] [-k[qBMGu] -g -w<warn levels> -c<crit levels> -d<delta>] [-o <octet_length>] [-t <timeout>] [-s] --label [-V]
nagios asa.PNG
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: CRITICAL;SOFT;9;(Return code of 255 is out of bounds)

Post by tgriep »

It looks like it is working for you now. Can we close the post?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked