I really have not done anything off the wall recently. Most of my day to day effort is dedicated to absorbing the information fire-hose that my team deals out on a daily basis. I have a couple of side projects I have been wanting to catch up on but they are all to big to start at the moment.
And to be honest it has been getting to me. I like contributing to the vSphere community and it has been a while (in my head at least) since I released something for that purpose.
So in that spirit I had a brainstorm Friday evening (2 days ago). I had been working on my blog and had a sudden crazy idea…
What if there was a WordPress plugin that would display stats from my vSphere home lab or work? Wouldn’t that rock??
Turns out there isn’t one. Or at least there wasn’t one till till now. After a weekend of coding I am happy to present the first WordPress Plugin for VMware vSphere: WP-vSphereStats
If you are super observant you may have noticed the plugin is actually running in the sidebar on the left. Basically the way it works is pretty simple.
The WP-vSphereStats plugin comes in two pieces. One is the WordPress Plugin itself. It is tested and compatible with WordPress 2.9 and above. It uses the new widget changes in 2.8 and is dependent on some helper changes in 2.9.
The second piece is a Windows command line tool used to pull stats from your vSphere Environment and posts them to a web service enabled by the WP plugin. The combination of these pieces means some pretty cool features:
The WP plugin allows you to run multiple widgets with different stats
All web service calls to your blog are secured by a key that is randomly generated. This prevents outsiders from changing you stats.
I tried to bring a wide range of interesting stats and safe for public stats. These include: total CPU, RAM, Storage, # of Hosts, # VMs, # of VMotions, Power States, etc.
The WP Plugin has error control to alert you when there is a problem with the web call (from admin settings).
The command line tool has two modes. One where you create a configuration file that is saved where you specify. The other where you point it to a configuration and update a WordPress blog. This allows you to update multiple blogs, schedule as you like, and securely caches login information for you vSphere Environment in XML.
- I stayed away from creating new tables in the database. Everything is as lightweight as possible.
And best of all, the install is a snap. Two zip files extracted and you’re done.
This whole mini-project was a mini-vacation for me from working on my VMworld session and studying for my CCNP test next week. I tried to keep the whole program simple to allow easier support for me and more fun for you. I scrapped the idea of an installed Windows Service and opted for the command line tool. But, I did spare no expense in time making sure the WP plugin was slick as can be. My apologies to those that don’t use WordPress. I may find time to write for another CMS but, if you are feeling intrepid, feel free to convert to your own purpose 🙂
To download and use the WP-vSphereStats plugin go here: WP-vSphereStats plugin
The plugin is in the process of being added to the WordPress Codex. Should be available from there by the end of the week.
And as always please leave comments if you like or dislike. Feedback always helps, especially if you have an idea on how to improve.
See you at VMworld 2010