Category: WordPress Plugin

  • vMetrics 1.2 Plugin for WordPress – Multiple Cluster Edition

    vmetricsI have been a fan of both Nick Weaver’s WP-vSphereStats and Sean Duffy’s fork of that – vMetrics Plugin for WordPress but one of the things missing from vMetrics was additional Clusters.

    I asked on Twitter if anyone knew how to add that functionality in and Sean kindly responded saying it was hard coded to the WordPress plugin’s PHP but if I had the inclination I could have a look and see if I could add the required functionality, now I should add that I am not a coder, so it was with a little hesitation that I started to look at the code.

    I am pleased to say however that it only took me a couple of hours to butcher Sean’s excellent work to make it display a second cluster, it’s not pretty but it does work.

    Browsing the code should make it fairly obvious what I did to allow me to show a second cluster and I don’t see any issues with adding additional clusters to the output, follow the same train of thought (or if you can do it better) and please let me know (after all, who doesn’t want better \ improved code).

    Please note that I had to make changes to both the WordPress plugin as well as the PowerCLI Updater script, again fairly obvious changes but it works.

    With regards to installation, you should be ok to just over write your existing plugin, if you’re starting from scratch do a manual installation using either the zip file or by directly uploading the extracted files to your plugins folder.

    Change log for version 1.2:

    • Added additional metrics section for second cluster information
    • Updated PowerCLI updater script to allow you to gather and upload second cluster information.
    • Completely made a mess of the previously cleaned up PHP in main plugin code, it’s a mess but it works.

    I am making this available to anyone that want’s it, I have given credit to both Nick Weaver and Sean for their earlier work and ask that anyone moving this forward does the same please.

    (more…)