In a way, this post is a sequel to the previous MRTG tutorial I wrote. Then again, it’s slightly more specific towards the Cisco 7200 series router, so it wouldn’t be as applicable to everyone. If you are interested in graphing Cisco MRTG temperature though, read on.
Once again the disclaimer follows – I’m using Debian distribution 2.4.18-bf2.4.
#1 Knowing what’s good and what’s not
It’s not very useful to know the temperature if you don’t know what you’re looking out for.
Ambient operating temperature: Cisco advises a minimum of 32°F (0°C) and maximum of 104°F (40°C). 40 degrees Celsius doesn’t sound like it’s enough to cook the router though.
If we check the table displayed in our router’s CLI by going into exec mode:
Router#show environment table
Seems to be a wee bit higher than what the website said? Oh well, I guess it’s a good thing.
#2 Checking your router’s temperature the quick and easy way
Login to your router (telnet, console whatever) and go into exec mode.
Router#show environment all
I believe the display differs according to the NPE (Network Processing Engine) you’ve got, but this is what mine says.
Power Supply 1 is Zytek AC Power Supply. Unit is on.
Power Supply 2 is Zytek AC Power Supply. Unit is on.
I/O Cont Inlet measured at 25C/77F
I/O Cont Outlet measured at 27C/80F
NPE Inlet measured at 28C/82F
NPE Outlet measured at 29C/84F
+3.45 V measured at +3.50 V
+5.15 V measured at +5.25 V
+12.15 V measured at +12.39 V
-11.95 V measured at -11.85 V
Envm stats saved 94 time(s) since reload
The bolded section’s what we want, period.
#3 Using MRTG to plot your router’s temperature
Takes a bit more effort, but at least you’ve got some historical data to rely on for comparison. Plus, you don’t have to keep logging into your router to check!
We can’t use
cfgmaker this time round as it takes a bit of typing to get things done.
Here’s a sample .cfg template of what I used:
YLegend[router.temp]: Degrees C
Options[router.temp]: nopercent, growright, gauge
Legend1[router.temp]: Average 1 minute Inlet Temperature
Legend2[router.temp]: Average 1 minute Outlet Temperature
Legend3[router.temp]: Average 5 minute Inlet Temperature
Legend4[router.temp]: Average 5 minute Outlet Temperature
PageTop[router.temp]: <H1> Router temperature - Degrees C<BR></H1>
There’s actually four points of temperature measurement for the 7200, but since we only need two for the MRTG, I used the inlet temperature and one of the outlets, which makes more sense than checking the temperature of two outlets.
OIDs for the four points are as follow:
Outlet 1 .188.8.131.52.184.108.40.206.220.127.116.11.3.2
Outlet 2 .18.104.22.168.22.214.171.124.126.96.36.199.3.3
Outlet 3 .188.8.131.52.184.108.40.206.220.127.116.11.3.4
Follow up with the usual steps to creating the index and populating the cron job (refer to my previous MRTG article), and we should be done.
Credits for the solution goes to a whole ton of Googled results, and I sort of lost track along the way after reading numerous websites. One of the major help sites is the MRTG mailing list, and the people there are seriously good.
I hope this post helps some other poor soul out there who’s trying to do the same thing, and here’s to you saving two hours of research on doing up a Cisco MRTG temperature graph for your router.