Easter programming project: Live stats and graphs from my home lab (vSphere, SNMP and C# content)

Associate
Joined
1 Dec 2005
Posts
803
I know I've probably turned a lot of you off at the mention of 'home lab' (and possibly programming too), but stick with it because you might see applications for this in the business world (I can certainly think of a few)...

Live view - http://niknak.org/extras/sysinfo

Screenshots:

lcYnh0Zl.png.jpg s74IywFl.png.jpg

It started off by being inspired by the vMetrics Wordpress plugin so I decided I wanted something similar on my website since it's running on my home lab platform. The tricky bit was learning the nuances of the vSphere SDK and corresponding C# API, which wasn't so bad once I got my head into it (the hardest bit being realising you don't need to mess about compiling binaries from VMwares source, you can just pinch them from the PowerCLI installation). The Managed Object Browser is an invaluable tool for discovering what's made available where.

Then I decided I wanted to see the temperature reading from my TemPager device but that meant figuring out how to read data from SNMP. Again, pretty easy with the right .NET library (thank you SnmpSharpNet).

Of course with this new found SNMP power I wondered what other data I could turn into a petty graph. After upgrading the firmware on my UPS to something a bit more useful, I had the power consumption being logged and displayed nicely. The UPS isn't running the lab platform yet so that bit isn't live at the moment (my workstation is drawing power in the screenshot).

The data is pulled from each source and stored in a few MongoDB collections and then presented on the webpage. Once the data's in the DB you can do a lot of other things with it, such as alerting or recording and predicting patterns. I've had a bit of interest in the code (C# .NET 4.0) so I'll be publishing on GitHub hopefully this week with some documentation.

All in all a fun way to waste a few hours over the Easter break :)
 
it looks Cool :) i was looking to do something similar for work to monitor a few servers, services and switchs as well as harddisk capacity / disk free / used :)
 
Back
Top Bottom