After finishing up my HOL Provisioning script I moved on to the second thing on my list of Todo’s since the first HOL event in Kansas City… Build a dashboard.
I found that about 10 minutes into the lab things were starting to act funny, like vcloud director not opening console windows, and it wasn’t until i opened the vSphere client and seen that we were using something like 24Ghz of CPU power and 94GB of ram, that I realized the hardware was tapped out. Well this time we are going to know when we get close way before the cliff. You can check out the real-time dashboard at http://dashboard.vcloudlab.net
The dashboard uses many different technologies to produce the finished product:
Google Visualization API’s for chart generation
PowerCLI for gathering stats from View, vCloud Director, and vSphere
MySQL to store the stats
Apache web server to serve the finished product to you!
To say the least this is the most ive ever dug into a few of these languages, but with the help of Google we have something that works!
If you are interested in the code that makes this work let me know, I’m not just going to post a download link because it is pretty complex to setup and I haven’t created an install guide or even gathered all the parts and pieces into one area. If you need it though email me and Ill get it together. [email protected]
Update: This script was intended for vSphere 4 and had a bunch of limitations. For a newer version with more functionality check out FixingITpro.com.
PowerCLI, and Powershell in general, are two things I don’t do much with. I’ve used it before when generating a few vSphere Health Check reports but other then that I haven’t played around with it. Today though I was trying setting up a vCenter server and was faced with the daunting task of configuring email alerts from all the alarm settings. This is something that I do on all installs and it normally takes at least 30 minutes because each one has to be done individually.
Not anymore though. I found Chris Uys’s PowerCLI script that can setup vCenter alarms with a single command! Below is the script and to run it you only need to change four fields.
vCenter IP address
Email address to send alerts to
I have modified the script from its original version because it only touched four of the 30 settings in vCenter, my version sets up 17.
How to use it
The first thing to do is download VMware PowerCLI from here. After installing you will have a PowerCLI Icon on your desktop… find it as we will come back to it in a minute.
Next download the script below and extract it to your c:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI directory
Right click on the file and edit it with your favorite text editor. You will need to change the following variables to match your environment.