3ware_temp plugin for munin
After having my Nagios installation mostly set-up (I still want it to sms though) I figured I also wanted some performance graphs. Performance graphs are useful to predict problems, you can see the performance of your server (d0h), figure out strange problems and the most important thing: they look cool to people who don’t understand them.
At first I figured because I use Nagios, I should also use Nagios to provide me with the performance data. Nagios does all the checks and I could use the output of the checks to feed it to rrd and let it make the graphs.
After searching the internet and looking at NagiosExchange I decided to use n2rrd. This tool uses the performance output from the nagios plugins and makes the graphs from there.
I have to say, it really is a great tool. I would recommend looking at it. But still, after some testing, I didn’t use it. The problem I had was that most of the plugins I’m using do not give the right performance output or it was pretty much unclear what the output meant. This was a bad thing because now I had to modify the plugins which is something I definitely do not want because I’m using prepackaged plugins and it takes a lot of work.
So I got munin up and running. Munin is packaged for debian and comes with a *lot* of ready to use plugins. After configuring everything I needed I looked at the hdd_temp plugin. The hdd_temp plugin takes some configuration on 3ware controllers. You have to specify all the drives you want monitored and provide some mapping between drive names and 3ware controller possitions. In my case this is totally useless. I want to monitor all drives in my server. Do configuring every single drive is just too much work.
So, I wrote my own munin plugin which uses the tw_cli utility to detect the available drives and smartctl to query the drive temperatures accordingly. The plugin is available here. And here’s some example output:

(This is actually a nice example of why you should do these kind of graphs. Above you can see the difference when the doors of the 19″ racks are open and when they are closed. There seems to be a bit of an airflow problem. Nothing problematic though.)


Comments(1)