[Nagiosplug-help] check_snmp string handling issue and
Gothard, Morgan
Morgan.Gothard at SUG.com
Tue Sep 28 14:54:23 CEST 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
> regarding
> 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 .1.3.6.1.4.1.30155.2.1.2.1.5.3
> SNMPv2-SMI::enterprises.30155.2.1.2.1.5.3 = STRING: "53.00"
>
>
> Version 1.4.15:
> ./check_snmp -H 10.0.0.2 -o .1.3.6.1.4.1.30155.2.1.2.1.5.3 -w 50 -c
> 60
> SNMP OK - "53.00" |
>
>
> Version 1.4.14:
> ./check_snmp-old -H 10.0.0.2 -o .1.3.6.1.4.1.30155.2.1.2.1.5.3 -w
> 50 -c 60
> SNMP WARNING - *53* | iso.3.6.1.4.1.30155.2.1.2.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.
~ Morgan
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 Help
mailing list