[Nagiosplug-help] check_snmp string handling issue and
Morgan.Gothard at SUG.com
Tue Sep 28 12:54:23 UTC 2010
On 28 Sep 2010, at 12:22, D?nial Olsen wrote:
> Something has changed between 1.4.14 and 1.4.15 in check_snmp
> handling of string values.
> Among other things I use check_snmp for reading temperature on my
> Soekris boxes
> (running sensorsd on OpenBSD 4.6).
> snmpget -v 2c -c public 10.0.0.2 .188.8.131.52.4.1.30184.108.40.206.1.5.3
> SNMPv2-SMI::enterprises.30220.127.116.11.1.5.3 = STRING: "53.00"
> Version 1.4.15:
> ./check_snmp -H 10.0.0.2 -o .18.104.22.168.4.1.3022.214.171.124.1.5.3 -w 50 -c
> SNMP OK - "53.00" |
> Version 1.4.14:
> ./check_snmp-old -H 10.0.0.2 -o .126.96.36.199.4.1.30188.8.131.52.1.5.3 -w
> 50 -c 60
> SNMP WARNING - *53* | iso.184.108.40.206.1.30220.127.116.11.1.5.3=53
> As can be seen from the output above, version 1.4.15 displays OK
> instead of
> WARNING and outputs no performance data.
> Version 1.4.14 displays the expected behaviour, the warning works and
> performance data is there.
I have the reverse problem (previously posted on 9/14) with 1.4.15, in that check_snmp used to (in version 1.4.11 at least) check the MIB and return a descriptive value with the integer obtained via SNMP as a string that could then be checked. I prefer to see something like "ok(1)" or "error(2)" in Nagios rather than just 1 or 2.
For a particular check, I don't want to have to remember that a value of 3 is bad and a value of 2 is really bad, but I can ignore 4. I want to see what these mean right on the Nagios screen.
What I suggest are TWO new options on this plugin. One "convert string to integer" option to address your problem, and a "convert integer to MIB string" option for mine. Unfortunately, I don't know enough C to fix this myself.
Private and confidential as detailed here: http://www.sug.com/disclaimers/default.htm#Mail . If you cannot access the link, please e-mail sender.
More information about the Nagiosplugin-help