Home Directory Plugins Hardware Environmental check_snmp_temperature

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com


Remember Me

Directory Tree


Current Version
Last Release Date
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI
  • Nagios Fusion
check_snmp_temperature.plcheck_snmp_temperature.pl - version 0.35 (Jan 2012)
check_snmp_temperature.plcheck_snmp_temperature.pl - version 0.41 (Mar 31, 2013)
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
General temperature check plugin - supports dell, hp, cisco, juniper, alteon. Other types can be specified easily if you know temperature SNMP OIDs. Data can also be returned as performance values for graphing or other processing.
This is a Temperature plugin that retrieves temperature sensor values using SNMP and can issue alerts if selected parameters are above specified number. It also returns performance data for further nagios 2.0 post-processing


Make sure you have Net::SNMP perl module installed.

If you want to check Dell servers, HP server, Juniper routers or Cisco Switches/Routers (cisco 7500, 5500, 2948) then you may skip much of the configuration hassles and use pre-programmed settings by using "--type" (or -T) parameter, you do still need to specify if you want output as C or F with '-o' option (see examples). The plugin currently does not support finding critical & warning thresholds which most systems also report in SNMP, so actual threshold you need to specify as well.

TYPES COMPATIBILITY NOTE: If you've previously used 0.2x version of this plugin to check HP equipment, beware that 0.3 version has "incompatible" change in that it returns human-readable sensor names rather than using HP locale ids to enumerate sensors. If you need old behavior then instead of using '-T hp' as parameter use '-N -D'

If you're using some other device then you need to check documentation to figure out correct parameters for this plugin, and specify base temperature sensor names table OID with '-N' and values table OID with '-D. You also need to specify what base sensor temperature data type is with "-i" (see below).

The way plugin works is to walk the snmp tree from base names OID and find all the sensor names. Then it compares names given with '-a' (names are separated by ',') to those found in the snmp tree (in '-a' you're expected to specify one word which would be found in the full sensor name and is unique for thaqt `sensor) and uses OID ending (i.e. part of OID after the base) and adds it to base value table OID to create OID to be retrieved (similar to how you find ethernet statistics OIDs based on name of the interface and in fact many of SNMP parameters are like that).

Note: If you don't know temperature sensor attribute names on your system do:

check_snmp_temperature -v -a '*' ...

(using '-v' option forces debugging output that should further help)

If your system does not have table with sensor names you can still use this plugin if you know exact temperature data OIDs. You specify list of names sensors with '-n' option and list of data OIDs with '-d' option (this can also be useful if you want to avoid having plugin do snmp table walk each time as retrieving specific list of OIDs is faster). You will also need to specify the same sensor names you put in '-n' with '-a' or '-A' option.

Request: If you have an new type of device and you figured out SNMP parameters that work, please send me email with this information so that I can add it as a new system type.

The values retrieved are compared to specified warning and critical values, but first the temperature has to be converted from base measurement units to measurement units you want. These units are Celsius (C) or Fahrenheit (F) or Kelvin (K) with input measurement unit specified with '-i' and output specified with '-o'. For input you sometimes have situation where sensor reports 10xRealValue, i.e. 33.5C is reported as 335 - this is supported too and then input type is specified as '-i 10C'.

Warning and critical values are specified with '-w' and '-c' and each one must have exact same number of values (separated by ',') as number of sensor names specified with '-a'. Any values you dont want to compare you specify as 0 or just not specify (i.e. -w ',50,'). In some cases you might not get data for specific sensor and want to substitute default value - this is supported with '-u' option (note that default values s in fact compared against -w and -c).

Additionally if you want performance output then use '-f' option to get all the sensors specified in '-a' or specify particular list of sensors for performance data with '-A' (this list can include names not found in '-a'). A special option of -A '*' will allow to get data from all sensors found and is this very useful to find what sensors you have with manual run.

define command {

command_name check_cisco_temperature
command_line $USER1$/check_snmp_temperature.pl -f -H $HOSTADDRESS$ --type=cisco1 -o F -C $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$


define service{

use std-service
hostgroup_name cs2948
service_description Temperature
check_command check_cisco_temperature!foo!Chassis!160!190


define command{

command_name check_dell_temperature
command_line $USER1$/check_snmp_temperature.pl -H $HOSTADDRESS$ -C public -N . -D . -i 10C -o F -u 0 -a ARG1$ -w $ARG2$ -c $ARG3$ -f


define service {

use std-service
hostgroup_name dell_1750
service_description Temperature
check_command check_dell_temperature!CPU,Ambient,Bottom!110,90,0!135,110,0


Also for some dell systems with all sensors enabled you can replace the above with:

check_command check_temperature!'CPU,PROC_1,PROC_2,Ambient,Bottom,BMC Planar,BMC Riser'!110,120,120,90,90,105,105!135,140,140,110,110,125,125

Reviews (6)
Hi William,

This plugins is working on our APC UPS from celsius to Fahrenheit temperature reading! Thank you!

However, I can't figure out how to read internal temperature of an HP Proliant DL360p server. Could you please provide the nagios XI command for it in Fahrenheit? Thank you.
bymarioalpha, July 9, 2014
1 of 1 people found this review helpful
check_snmp_temperature.pl -H -C public -n enterprises.0 -d . -a'.' -o C -w 30 -c 35

I have only a small error:

$ /usr/local/nagios/libexec/check_snmp_temperature.pl check_snmp_temperature.pl -H -C public -n enterprises.0 -d . -a'.' -o C -w 30 -c 35
OK - . Temperature is 23.5C

Argument "23.5 C" isn't numeric in division (/) at /usr/local/nagios/libexec/check_snmp_temperature.pl line 513.
bypacketguy, March 5, 2014
Thanks a lot, this plugin works excellent and i am now able to monitor my cisco 4506 and 3750 switches with one script and 1 command.

The command i ended up using which suited my needs was: ./check_snmp_temperature -H opa00sw1 -C netstat -T cisco1 -a '.' -A '.' -w 40 -c 50

And in opsview:
-H $HOSTADDRESS$ -C $SNMP_COMMUNITY$ -T cisco1 -a '.' -A '.' -w 40 -c 50

I used this in my opsview environment.
bywhit, August 19, 2011
Used iReasoning's MIB browser to get the values to use (http://www.ireasoning.com/downloadmibbrowserfree.php). After some trial and error, this works for the internal sensor:

./check_snmp_temperature.pl -H -C public -n internat-tempf.0 -d . -i 100F -o F -a tempf -w 85 -c 90

and this works for the external we've attached:
./check_snmp_temperature.pl -H -C public -n digital-sen1-2.0 -d . -i 100F -o F -a sen1-2 -w 85 -c 90
byaskarali, March 6, 2011
Very nice plugin and we are successfully monitoring the temperature of our juniper devices using this.

The command we use is ...

./check_snmp_temperature.pl -H Hostname -C xxxx -2 -T juniper -o C -a "Routing Engine 0" -w 44 -c 50