I’ve been given the chance to work with View a little more here recently and focus in on some of the gaps that are missing, specifically around reporting and alerting. vC Ops and the View adapter are in use, however the alerts leave much to be desired. I’m glad to be able to say that the gaps are filled in with the new version, and new title, of vR Ops and the View adapter but this environment is not yet to that point.
Examples of the vR Ops alerts which are included by default:
What gaps am I referring to? I’m aiming specifically at the View Pool state, provisioning state and the amount of available desktops compared to the headroom configuration.
To do this, I enlisted the help of the View PowerCLI cmdlets and the View Connection server ADAM database to create the script below that creates an output similar to this:
(Note: the asterics around the value that caused the report to be sent)
Before getting to the script, lets cover some of the requirements of the script:
- This script is to be run from a Connection server.
- This script is currently formatted to have the report be consumed by way of email.
- The email variables need to be filled in to match the environment it’s being run in.
- The email is sent only if the following criteria are met:
- A Pool’s state is false.
- A Pool’s provisioning state is false.
- A Pool’s available desktops are less than the headroom setting by the amount set in the desktopthreshold variable.
- The default desktop threshold is meant to be a percentage and is set to a default of 90%, or 0.9. This is easily modified on line 22.
Note: this was a script that worked in my environment. There is no warranty or support with this script, please use at your own risk.