For those that have been requesting some vCOps and/or vROps integration into PowerCLI, as I have been, we finally have our solution! PowerCLI 6.0 R2 brings that to the table in the form of a new module: VMware.VimAutomation.vROps
The following functions are featured in the module:
As you can see, I pulled the resources for a VMHost. Some of the basic, higher level, information is in there such as Health status and value, whether or not vROps is receiving any data about it, and how far back data has been collecting for the resource.
If you want to go straight to the stats, I don’t blame you one bit. However just running the Get-OMStat command is going to fill your PoSh window with every single stat available for that resource at all the time points available. Overwhelming would be putting it lightly, so you’ll want to also familiarize yourself with Get-OMStatKey. This function allows you to see what all stats you can actually pull:
Couple things I feel the need to point out:
- Include both the AdapterKind and ResourceKind objects when calling this function, it returns every possible stat key possible without it… All 17,646 of them.
- Even when including the AdapterKind and ResourceKind, I would highly recommend filtering out what what you’re looking for. The HostSystem ResourceKind has 2225 stat keys alone.
Some of the other functions included surround alerting.
If you notice in the example, the alert still exists but it’s status is changed to “Inactive”.
Overall, the new module definitely gets my stamp of approval! Thanks to the Automation and PowerCLI team for listening to the users and getting this integrated!
Additional information is available at the following link: https://blogs.vmware.com/PowerCLI/2015/09/powercli-6-0-release-2-is-now-generally-available.html