![]() |
John VanDyk has been innovating with information technology for more than 20 years. Read more... |
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 192.168.1.10 1.3.6.1.4.1.3699.1.1.3.1.2.1.0
where secret
is the SNMP community name, 1
is the version of SNMP, 192.168.1.10
is the IP address of the ENVIROMUX-MINI, and 1.3.6.1.4.1.3699.1.1.3.1.2.1.0
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:
- Download Cacti templates for the ENVIROMUX-MINI (does it bother anyone else that they had the caps lock down when they named this unit?)
- Import the templates into Cacti
- Create a new device within Cacti
- Add a data source
- Create a graph
- 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:
After:
To make this change persist, click Save at the bottom of the page.
Smile
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.
- Log in to post comments
Comments
Updated OIDs
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 1.3.6.1.4.1.3699
that the correct OID for temperature sensor 1 is
1.3.6.1.4.1.3699.1.1.7.1.5.1.1.7.1
and humidity sensor 1 is
1.3.6.1.4.1.3699.1.1.7.1.5.1.1.7.2
Looks like it changed again.
Looks like it changed again. It looks like it is now
1.3.6.1.4.1.3699.1.1.8.1.5.1.1.7.1
I don't have the humidity sensor or I would get that too
Setting max correctly
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.