Page 1 of 1

SNMP Check Plugin bug

Posted: Thu Aug 21, 2014 10:23 pm
by rajasegar
Nagios xi 2014R1.4

Please fix this problem. Version check in all the check_snmp plugins is broken.
It is comparing integer with string.

Code: Select all

[nagios@nagiosdevxi1 libexec]$  ./check_snmp_storage.pl -V
check_snmp_storage version : 1.3.2


[nagios@nagiosdevxi1 libexec]$ ./check_snmp_storage.pl -H 10.104.28.124  -C xxxxx --v2c -m '^[CDEF]:' -w 80 -c 95 -f
Argument "v6.0.1" isn't numeric in numeric lt (<) at ./check_snmp_storage.pl line 407.
Argument "v6.0.1" isn't numeric in numeric lt (<) at ./check_snmp_storage.pl line 481.
D:\ Label:ZRMSSEL_EN  Serial Number bce4043c: 100%used(411MB/411MB) C:\ Label:  Serial Number dcbc060b: 34%used(2779MB/8182MB) (>95%) : CRITICAL | 'D:\_Label:ZRMSSEL_EN__Serial_Number_bce4043c'=411MB;329;391;0;411 'C:\_Label:__Serial_Number_dcbc060b'=2779MB;6545;7772;0;8182
[nagios@nagiosdevxi1 libexec]$

Re: SNMP Check Plugin bug

Posted: Thu Aug 21, 2014 10:36 pm
by Box293
There is a newer version of the plugin available (1.3.3):

http://nagios.proy.org/snmp_storage.html

Download this and see if it fixes your problem.

Re: SNMP Check Plugin bug

Posted: Thu Aug 21, 2014 11:57 pm
by rajasegar
Box293 wrote:There is a newer version of the plugin available (1.3.3):

http://nagios.proy.org/snmp_storage.html

Download this and see if it fixes your problem.
It is 8 years old. Same problem
This is used by the Nagios Wizard for Windows SNMP and came with XI.
Why is nagios distributing old versions?

Re: SNMP Check Plugin bug

Posted: Fri Aug 22, 2014 1:21 am
by rajasegar
I have fixed the bugs and added windows physical memory plugin (fixed for Win2000 based on user feedback in the plugin page, swap remarked)
Names changed to avoid clash with existing plugins

Anybody interested, it is attached below.
SNMP_Fixed.zip

Re: SNMP Check Plugin bug

Posted: Fri Aug 22, 2014 1:48 pm
by abrist
Thanks kindly. I have passed the zip on to the devs for review.
rajasegar wrote:Why is nagios distributing old versions?
Mostly because the previous version was stable and the update was incremental. We have also made changes to many of these plugins so the upgrade path to the third party's new versions may have issues.

Re: SNMP Check Plugin bug

Posted: Sat Aug 23, 2014 5:34 am
by rajasegar
abrist wrote:Thanks kindly. I have passed the zip on to the devs for review.
rajasegar wrote:Why is nagios distributing old versions?
Mostly because the previous version was stable and the update was incremental. We have also made changes to many of these plugins so the upgrade path to the third party's new versions may have issues.
Ok. Noted.
BTW, I have removed the conditional check for (Net::SNMP->VERSION < 4) in the source_code. This is because I dont use the old version in any of my machines.
However it may not apply to all.

Please close this thread.