[Nagiosplug-devel] [ nagiosplug-Patches-3386172 ] check_snmp: fix for multiple non numeric OIDs
SourceForge.net
noreply at sourceforge.net
Thu Aug 4 14:58:20 CEST 2011
Patches item #3386172, was opened at 2011-08-04 14:58
Message generated for change (Tracker Item Submitted) made by mampfred
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3386172&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Bugfix
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Martin Rohrbach (mampfred)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_snmp: fix for multiple non numeric OIDs
Initial Comment:
Patch against Plugin Version (-V output): v1.4.15 (nagios-plugins 1.4.15)
Plugin Name: check_snmp
Example Plugin Commandline: -u a,b,c,d,e (see below)
Tested on operating system: SLES 11 SP 1 (Linux 2.6.32.29-0.3-default #1 SMP 2011-02-25 13:36:59 +0100 x86_64 x86_64 x86_64 GNU/Linux)
Tested on architecture: x86_64
Tested with compiler: gcc
When multiple OIDs are specified and the first one is numeric while another one is not, an error is encountered because is_numeric is not reset in the loop. The fix does just that.
bash# ./check_snmp -V
check_snmp v1.4.15 (nagios-plugins 1.4.15)
bash# uname -a
Linux kobarid 2.6.32.29-0.3-default #1 SMP 2011-02-25 13:36:59 +0100 x86_64 x86_64 x86_64 GNU/Linux
bash# ./check_snmp -H mary.unix.db.de -C nasfiler -o .1.3.6.1.4.1.789.1.2.2.4.0,.1.3.6.1.4.1.789.1.2.2.25.0 -w @1:2, -c @4:6,
No valid data returned
bash# ./check_snmp_numeric_fix -H mary.unix.db.de -C nasfiler -o .1.3.6.1.4.1.789.1.2.2.4.0,.1.3.6.1.4.1.789.1.2.2.25.0 -w @1:2, -c @4:6,
SNMP OK - 3 "The system's global status is normal. " | iso.3.6.1.4.1.789.1.2.2.4.0=3
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3386172&group_id=29880
More information about the Devel
mailing list