[Nagiosplug-help] check_snmp string handling issue and perfdata
DOL at ft.fo
Tue Sep 28 12:17:22 UTC 2010
> You'll find that that OID location says it is returning a string
> value, rather than a numeric value. Adding -v -v -v should show this.
./check_snmp -H 10.0.0.2 -o .22.214.171.124.4.1.30126.96.36.199.1.5.3 -w 50 -c 60 -vvv
/usr/local/bin/snmpget -t 1 -r 5 -m '' -v 1 [authpriv] 10.0.0.2:161 .188.8.131.52.4.1.30184.108.40.206.1.5.3
iso.220.127.116.11.1.3018.104.22.168.1.5.3 = STRING: "53.00"
Processing oid 1 (line 1)
response: = STRING: "53.00"
SNMP OK - "53.00" |
> The code was tightened because it was trying to do threshold checks
> against string values (which happened to be converted to a number ok),
> which doesn't make sense.
> I guess a flag would be required to say "force this string value into
> a numeric (float?) value" and do the comparison. But I think the
> default behaviour for a string returned type should be to not compare
A "treat string as integer" option would be desirable in this case.
Until then I'll keep an 1.4.14 version of check_snmp around for this particular check.
More information about the Nagiosplugin-help