SNMP CPU Temperature Check Not Graphing

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
maglaubig
Posts: 26
Joined: Thu Jan 03, 2019 2:02 pm

SNMP CPU Temperature Check Not Graphing

Post by maglaubig »

Up until a few months ago I had an SNMP check setup on a Supermicro server for CPU temperature from the IPMI device. It was using one of the NagiosXI checks that maps to check_snmp.

Code: Select all

/usr/local/nagios/libexec/check_snmp -H HOST -p 161 -o sensorReading.1 -C *** -P 2c -m ATEN-IPMI-MIB
SNMP OK - "33.000" |
The ATEN-IPMI-MIB is from Supermicro, the actual OID for the CPU 1 temperature sensor is ".1.3.6.1.4.1.21317.1.3.1.2.1". I already know what the problem is, There isn't any data after the pipe to graph. I attempted to recreate the check and the wizard wouldn't let me complete it without a warning/critical setting in the check. When I add those to the command it outputs as expected:

Code: Select all

SNMP OK - CPU Temp 33 C | 'CPU Temp'=33C;40;;
Must I have a warning and critical threshold set for any SNMP values for this to work? I have other checks that don't have thresholds set, but they're also being calculated as a --rate for packet info on a switch port using IF-MIB.

I'd like to understand if I just implemented something based on a bug that's been fixed or if I found one. In other words, what's the way I should do this check?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: SNMP CPU Temperature Check Not Graphing

Post by tgriep »

When running the SNMP Wizard, if you leave the Match Type to none, that the requirements for adding a warning or critical thresholds is not needed.
Be sure to check out our Knowledgebase for helpful articles and solutions!
maglaubig
Posts: 26
Joined: Thu Jan 03, 2019 2:02 pm

Re: SNMP CPU Temperature Check Not Graphing

Post by maglaubig »

That solves the mystery about why the wizard required the warning/critical thresholds.

I also realize I did a terrible job asking the question I really wanted to know, only stating that I know why it's not working. Graphing stopped working on this SNMP check. From what I can tell it's because check_snmp isn't returning any information after the pipe unless I specify a warning or critical threshold for the check.

I performed the check with the --verbose option. Here's the output:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H HOST -p 161 -o sensorReading.1 -C ... -P 2c -m ATEN-IPMI-MIB --verbose
/usr/bin/snmpget -Le -t 10 -r 5 -m ATEN-IPMI-MIB -v 2c [context] [authpriv] s2d01-r.ofst.local:161 sensorReading.1
ATEN-IPMI-MIB::sensorReading.1 = Wrong Type (should be INTEGER): STRING: "33.000"
SNMP OK - "33.000" |
Any chance this type mismatch is the source of the lack of graphing?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SNMP CPU Temperature Check Not Graphing

Post by lmiltchev »

Perhaps the perfdata is not shown as the plugin outputs a string instead of an integer, and in order to "do the math", thresholds are needed. I would recommend that you use thresholds in your check in order to get the perfdata. You can use something that is not going to set an alert (if you don't want one).
Be sure to check out our Knowledgebase for helpful articles and solutions!
maglaubig
Posts: 26
Joined: Thu Jan 03, 2019 2:02 pm

Re: SNMP CPU Temperature Check Not Graphing

Post by maglaubig »

That is what I was suspecting and I think the info is being returned as a string since I don't believe floating point is possible. The only thing I can think of is that something changed in a firmware update of the IPMI device that changed this behavior within the time frame of when the graphing stopped working. Casting the string as a numeric doesn't seem to be worthwhile either.

I'm marking it as a solution, use thresholds and suppress alerts instead. Thanks!!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SNMP CPU Temperature Check Not Graphing

Post by lmiltchev »

Sounds good! I am closing this topic then and making it as resolved. If you have any further questions/issues, please start a new thread. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked