[Nagiosplug-devel] [ nagiosplug-Bugs-3573832 ] check_snmp - integer parsing

SourceForge.net noreply at sourceforge.net
Tue Oct 2 18:13:00 CEST 2012


Bugs item #3573832, was opened at 2012-10-02 09:13
Message generated for change (Tracker Item Submitted) made by porjo38
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3573832&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: Parsing problem
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ian (porjo38)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_snmp - integer parsing

Initial Comment:
Plugin Version: check_snmp v1.4.16 (nagios-plugins 1.4.16)
Plugin Name: check_snmp
Operating System: Centos Linux 5
Architecture: Intel 32bit
Compiler: gcc


I am monitoring the power supply status on an APC PDU device. The snmp query returns integer 1 when status is good and integer 2 when status bad.

In order to test this with check_snmp I'm attempting to set a '-c' value that will make the check fail. I would expect that setting '-c 1' should result in CRITICAL and yet it doesn't:

./check_snmp -H 10.254.254.119 -o .1.3.6.1.4.1.318.1.1.12.4.1.1.0 -C netben -c 1 -v
/usr/bin/snmpget -t 1 -r 5 -m '' -v 1 [authpriv] 10.254.254.119:161 .1.3.6.1.4.1.318.1.1.12.4.1.1.0
iso.3.6.1.4.1.318.1.1.12.4.1.1.0 = INTEGER: 1
SNMP OK - 1 | iso.3.6.1.4.1.318.1.1.12.4.1.1.0=1

I've found that if I use '-c 2:2', I get the result I would expect....but yet that makes no sense!?

./check_snmp -H 10.254.254.119 -o .1.3.6.1.4.1.318.1.1.12.4.1.1.0 -C netben -c 2:2 -v
/usr/bin/snmpget -t 1 -r 5 -m '' -v 1 [authpriv] 10.254.254.119:161 .1.3.6.1.4.1.318.1.1.12.4.1.1.0
iso.3.6.1.4.1.318.1.1.12.4.1.1.0 = INTEGER: 1
SNMP CRITICAL - *1* | iso.3.6.1.4.1.318.1.1.12.4.1.1.0=1 


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3573832&group_id=29880




More information about the Devel mailing list