Page 1 of 1

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

Posted: Mon Jun 15, 2015 9:54 am
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.

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

Posted: Mon Jun 15, 2015 10:41 am
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.

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

Posted: Wed Jun 17, 2015 10:12 am
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

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

Posted: Wed Jun 17, 2015 1:58 pm
by tgriep
It looks like it is working for you now. Can we close the post?