check_snmp and junk perfdata
Posted: Tue Apr 17, 2012 4:58 pm
I've fallen in love with and been disappointed by check_snmp on the same day. Someone please know the answer!
So I've found that if I query a SNMP value that is an INTEGER, everything looks good:
However if the data is Counter32, it appends a little 'c' to the end of the perfdata:
What the heck? It's causing a lot of weird results in PNP4NAGIOS and just breaking the graphs. Where is that little 'c' coming from and how can I get rid of it? I've already tested multiple sources with Counter32 data... it happens for ALL of them.
So I've found that if I query a SNMP value that is an INTEGER, everything looks good:
Code: Select all
root@nagios:~/workspace# /usr/local/nagios/libexec/check_snmp -H 10.1.11.184 -C nagios -o ifMtu.1 -v -l Data
/usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] 10.1.11.184:161 ifMtu.1
IF-MIB::ifMtu.1 = INTEGER: 16436
SNMP OK - Data 16436 | Data=16436
Code: Select all
root@nagios:~/workspace# /usr/local/nagios/libexec/check_snmp -H 10.1.11.184 -C nagios -o ipInDelivers.0 -v -l Data
/usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] 10.1.11.184:161 ipInDelivers.0
IP-MIB::ipInDelivers.0 = Counter32: 834555526
SNMP OK - Data 834555526 | Data=834555526c