Generate ESX documentation with ESX Healthcheck script
If you are looking for a free and quick method to document your ESX 3.0.X and ESX 3.5 server configurations without installing a scripting environment then don’t forget about A. Mikkelsen’s ESX Healthcheck script. An oldie but still a goodie, this script is simply transferred to your ESX 3.5 Console and then just run manually or via a scheduled job. The end result is a .html report that is saved on your ESX host, or if you utilize the optional send_smtp.pl script the report can be mailed to you automatically.
I’m not providing any new information in this post. In fact I am way behind as Duncan Epping has covered this script on his blog at Yellow-bricks.com. Duncan first posted about the esx healthcheck script in January 2008 and recently mentioned it again in his post about his tools he uses when conducting customer Healthcheck services. The comments thread on Duncan’s January post walk through a year’s worth of feature development and support.
Download your copy of the script at SourceForge.net: ESX Healthcheck Script
Once downloaded, the .zip file contains several helpful text files along with the script. The rest of this post walks through the install and configure steps and then explains how to run the script when ready.
The INSTALL file explains configuration steps.
You can ignore steps 1. and 2. if you do not want the report to be auto mailed via smtp.
How to quick install:
* 1. Get smtp_send.pl from http://www.vmguru.com/files/10/scripts/entry102.aspx
Put the file in the same folder as health_check.sh.
Please read in smtp_send.pl about prerequesites (MIME::Lite) installation.* 2. Get MIME::Lite from http://search.cpan.org/~yves/MIME-Lite-3.01/lib/MIME/Lite.pm
I had to create the MIME folder and copy file to /usr/lib/perl5/5.8.0/MIME/Lite.pm on my test system.
# mkdir /usr/lib/perl5/5.8.0/MIME
# cp MIME-Lite-3.01/lib/MIME/Lite.pm /usr/lib/perl5/5.8.0/MIME/Lite.pm* 3. Copy health_check.conf.example to health_check.conf
# cp health_check.conf.example health_check.conf
* 4. Edit health_check.conf with maildata (set mailoutput=0 if you do not want to use email) and other adjustments
* 5. Make sure to open firewall port 25 out
# esxcfg-firewall -o 25,tcp,out,smtp_out
* 6. Make sure that health_check.sh and smtp_send.pl scripts has the right execute permissions
# chmod 744 health_check.sh
# chmod 744 smtp_send.pl
The USAGE file explains how to run it.
Of course, you first have to place the health_check.sh amd file in a directory on your ESX 3.0 or 3.5 host. I recommend free file managemnt tools like WinSCP, FastSCP, or VMX Explorer to transfer the file.
Once the the files are in place
* 1. Become root.
* 2. Run from within the folder with the script
#./health_check.sh
* 3. Check email or /var/log/esx* for output











