Page 1 of 1
check_snmp_load bug
Posted: Mon Apr 04, 2016 1:02 am
by rajasegar
Please check on this. I recall posting about this sometime back.
Code: Select all
[nagios@nagiosprodxi1 debug]$ /usr/local/nagios/libexec/check_snmp_load.pl -H 10.11.11.111 -C testing --v2c -w 70% -c 90% -f
Argument "v6.0.1" isn't numeric in numeric lt (<) at /usr/local/nagios/libexec/check_snmp_load.pl line 685.
12 CPU, average load 0.0% < 70% : OK | cpu_prct_used=0%;70;90
Re: check_snmp_load bug
Posted: Mon Apr 04, 2016 1:12 am
by Box293
What version is your plugin?
Code: Select all
./check_snmp_load.pl -V
check_snmp_load version : 1.3.2
It seems to work fine on mine:
Code: Select all
/usr/local/nagios/libexec/check_snmp_load.pl -H centos01 -C public --v2c -w 70% -c 90% -f
1 CPU, load 1.0% < 70% : OK | cpu_prct_used=1%;70;90
Re: check_snmp_load bug
Posted: Mon Apr 04, 2016 1:44 am
by rajasegar
Box293 wrote:What version is your plugin?
Code: Select all
./check_snmp_load.pl -V
check_snmp_load version : 1.3.2
It seems to work fine on mine:
Code: Select all
/usr/local/nagios/libexec/check_snmp_load.pl -H centos01 -C public --v2c -w 70% -c 90% -f
1 CPU, load 1.0% < 70% : OK | cpu_prct_used=1%;70;90
Code: Select all
./check_snmp_load.pl -V
check_snmp_load version : 1.3.2
Re: check_snmp_load bug
Posted: Mon Apr 04, 2016 1:47 am
by Box293
What type of device is 10.11.11.111 ?
If it's a Linux server, can you please post the /etc/snmp/snmpd.conf file please?
Re: check_snmp_load bug
Posted: Mon Apr 04, 2016 1:48 am
by rajasegar
I think the never version of the SNMP returns V6.0.1 instead of the integer it is expecting.
Re: check_snmp_load bug
Posted: Mon Apr 04, 2016 2:08 am
by rajasegar
Box293 wrote:What type of device is 10.11.11.111 ?
If it's a Linux server, can you please post the /etc/snmp/snmpd.conf file please?
It is a windows box. As updated before it is the version related issue.
I have patched a custom version which bypasses this issue before
Check this line and you will understand the problem /usr/local/nagios/libexec/check_snmp_load.pl line 685
Re: check_snmp_load bug
Posted: Mon Apr 04, 2016 11:12 am
by tgriep
Edit the check_snmp_load.pl file find and replace the following line
with
Try that to see if that fixes it for you.
Re: check_snmp_load bug
Posted: Mon Apr 04, 2016 7:21 pm
by rajasegar
tgriep wrote:Edit the check_snmp_load.pl file find and replace the following line
with
Try that to see if that fixes it for you.
It does but coding wise comparing string (v6.0.1) to integer (4) is not a best practice even though perl seems to accept this.
Anyway this will do for now.
Thanks. Please close this case.