Monitoring Temperatures with Cacti
(Page 1 of 4 )
You are reading the sequel to the article we published last week on Cacti, the RRDTool based graphing solution. In the previous article we learned how Cacti works and how to deploy it. While it can monitor network load, hard drive spaces, CPU utilization, available memory, and all that right out of box, there are two things left to monitor: temperatures and voltages. In this article we’ll find out how!
First of all, this article has the following prerequisites: a working version of Cacti fully configured, along with a bit of experience that you should have acquired playing around with it when you set it up and maybe even afterward. If you haven’t read the previous article that we featured here, then please do so before moving forward. It’s really important to know what Cacti is about, how it works, and why you should use it.
Graphing temperatures and voltages is about monitoring the fluctuation of those values. Therefore, this means somehow “grabbing” the data from the sensors, and then it’s actually almost a piece of cake creating those charts based on the received values. Throughout this article we’ll cover two different scenarios: one for Microsoft Windows operating systems and another for GNU/Linux distributions (but also UNIX).
Quite a while back we featured an article on Dev Hardware that explained how onboard sensors report temperatures and voltages. It might be worth checking that article if you aren’t already familiar with the process and the accuracy of these onboard sensors. You can find it here.
Before we begin, let’s flesh out how we’re going to accomplish our task. Under Microsoft Windows-based operating systems we will use the ultra-popular free utility that monitors temperatures, voltages, HDDs, and sports many more functions as well—it’s Speedfan. This project is still frequently updated, and there’s lots of ongoing development and support going into it, so it’s a reliable choice.
Moreover, since we cannot directly import the reported values into Cacti, we’re going to use a fancy but simple SNMP Extension for SpeedFan. You can find it here. This extension exports the values into OIDs during runtime, and then you can set up Cacti to make charts. But on the second page we’ll explore this a bit deeper...
In the case of Linux we’re going to rely on lm-sensors. This project supports a great deal of hardware monitoring. Using a little script written in virtually any language (but Perl and Bash is preferred, perhaps), we can grab the values and format them in an appropriate way, so that loading them into Cacti will become a piece of cake. Even though lm-sensors already comes with an RRDTool based graphing utility, now we’ll focus on Cacti.
Having said this, let’s begin!
Next: Monitoring Windows Systems >>
More Server Administration Articles
More By Barzan 'Tony' Antal