vCheck – VMware vSphere monitoring and reporting

If you’re not already running some sort of monitoring tool or script on your VMware vSphere environment may I suggest you get acquainted with vCheck. Reader, meet vCheck. vCheck, reader 🙂

Alan Renouf (Working for VMware in Technical Marketing and PowerCLI guru | @alanrenouf on Twitter) has programmed vCheck – a script that can list a whole lot of valuable information about your vSphere environment and present it in a nicely formatted html file that can be delivered by mail in your inbox every morning.

Among other things the script shows various VM statistics including (maybe forgotten) snapshots, free space of datastores, missing VMTools . Alerts and errors are listed separately.

Note one of the prerequisites is PowerCLI 4.0 U1 or later (on the server running the script)
To show the current version of PowerCLI run:Get-PowerCLIVersion

NB: I’ve had a ton of problems initially setting this up as a scheduled task.. It turns out the a scheduled task cannot run a script on a mapped drive (for example P:\vCheck5\vCheck5.ps1), so make sure to use a UNC path when pointing to the script if it’s not located on the server being configured with the scheduled task!

The following works like a charm*

Use the Action: Start a program
Program/script: powershell
Add arguments: -c "\\server\share\vCheck5.ps1 vcenterserver"

The running of the script takes a few minutes (depending of the size of your environment). At work with 11 hosts and 6x VM’s it takes 7 minutes to complete.

When viewing the result e-mail in Outlook, make sure to view the file in an external browser (as a .mth file) – my Outlook 2010 doesn’t show the headlines for each section which makes the rapport quite difficult to read.