Friday, March 1, 2013

SNMP polling temp as Celsius and changing it to Fahrenheit nagios/opsview

A little while ago, I created a Opsview install that monitors all aspects of the network from temp/humidty/air flow readings off our WeatherGeese devices to APC loads and charges to server uptime and service states. This turned out quite nicely. I used a tutorial over at to get it started and been hacking it ever since.

My latest issue with it is that some of our environmental devices are either too old, coded wrong or have the wrong temp sensors in them to report Fahrenheit temps. they are only in Celsius. Now, even tho nagios does a good job at reporting red/yellow/green indicators (using the rawNumbers gadget), it is still in Celsius.

I sent a few pings out to my nerd community and they answered. Here is the entire post of what followed at this link:

Long story short, here is the complete code that you can use and adjust to your liking. It took quite a bit of hacking apart and I appreciate George1421's assistance. I do not know how to code. I'm only VERY dangerous using multiple languages. I think we got through it! :)

This will allow you to poll the device using the syntax that is allowable (its defined in the help or at the bottom of the code). I added the functionality of the OID in the parameters so its not hard coded in anymore.

No comments:

Post a Comment