Graphing the ENVIROMUX-MINI Temperature Probe with Cacti

We use an ENVIROMUX-MINI to monitor temperature in the server room. This unit makes its data available over ethernet via SNMP. You can get the current temperature recorded by its probe with:

snmpget -c secret -v 1

where secret is the SNMP community name, 1 is the version of SNMP, is the IP address of the ENVIROMUX-MINI, and is the indexed OID of the temperature probe.

You can see the hierarchy in this screenshot of the iReasoning MIB Browser with the ENVIROMUX-MINI MIB file loaded.

I wanted to make a nice graph of the temperature using Cacti. An overview of the process is:

  1. Download Cacti templates for the ENVIROMUX-MINI (does it bother anyone else that they had the caps lock down when they named this unit?)

  2. Import the templates into Cacti
  3. Create a new device within Cacti
  4. Add a data source
  5. Create a graph
  6. Edit the graph

Download the Templates

Thanks to user fletch, you can download the templates as a .zip file here.

Import the templates into Cacti

Import all four templates using the Import Templates link in the Cacti console.

Create a New Device

Under Devices, click Add and add the Enviromux-mini as a new device. (Yes, I've stopped capitalizing it because it hurts my eyes.)

Add a Data Source

After adding it as a device, click on the Data Source List link:

Select the Data Template named ENVIROMUX - Temperature and click Create.

Create a Graph

Click on Create Graphs for this Host. It will ask you to select a Graph Template. Choose the ENVIROMUX - Environment graph template.

When you do this, it will list the OID for both the temperature and humidity probes. I only have the temperature probe on my unit, but adding both here is not a problem -- they can be removed in the graph template later.

Edit the Graph

If, like me, you do not have the humidity probe, the setup that we've just created will not produce a very nice graph. That's because the nonexistent humidity probe will return a value of 65535. This will make Cacti create a graph with a vertical axis that accommodates that value, making your temperature values crawl along the horizontal axis. My solution was to simply remove the humidity data sources from the graph template. To do that, click on Graph Templates in Cacti and click on the title of your graph. Humidity can be removed by clicking on the red X to the right of items 5-8. Before:


To make this change persist, click Save at the bottom of the page.


Here's the resulting graph. Yes, it's hot in the server room. The air handlers are offline at the moment and we're watching things closely. Also, I'm wearing shorts in the office in February.



We got new units (ENVIROMUX-MINI-LX) and they seem to have changed the OID values. I can't seem to locate a current MIB file but The MIB file is here. I'm guessing from inspecting the output from

snmpwalk -v1 -c public x.x.x.x

that the correct OID for temperature sensor 1 is

and humidity sensor 1 is

Looks like it changed again. It looks like it is now

I don't have the humidity sensor or I would get that too

Note that the temperature probe will give temperature values that are 10x more than the actual value. For example, 70.5°F is given as 705. If, in your Data Template you have the Data Source Item Maximum Value set to something like 100, you're going to get -nan in your graph because the value being returned is 705 which exceeds your max. So you'll want to set the max to something like 1100.

If you have an RRD that you want to fix the maximum on, you can do it at the command line like this:

rrdtool tune /usr/share/cacti/rra/enviromux_temperature_173.rrd --maximum Temperature.max:1100

In the above example, enviromux_temperature_173.rrd is the name of my RRD; yours will differ.