That can be done by the esx-health.pl script.
The monitoring script must be launched from a host with the vSphere SDK for Perl installed.
Reference Monitoring VMWare vSphere 4 for installation steps.
Download script from: http://blog.peacon.co.uk/wiki/Esx-health.pl_code
A local copy of esx-health.pl.
Suppose we want to check a host:
esx-health.pl --server esxi.example.com --portnumber 9443 \ --username nagios --password m0n1T0r \ --exclude "Power Supply" \ --reportname /tmp/esx-host-health-report.html \ --statusfile /var/log/esx-health-status.txt \ --logfile /var/log/esx-health.log \ --warnonalerts --warnonchange \ --mailhost mail.example.com --mailfrom root@example.com --mailto alert@example.com