Monitoring hardware through VMWare ESXi and Nagios
I have recently installed some VMWare ESXi machines running on Dell hardware. These are pretty standard PowerEdge 2850 and 2950 servers.
One of the big problems on ESXi is how to monitor the health of the hardware when using ESXi.
As I also use Nagios I just did a quick search through NagiosExchange and found this little python script:-
Pre-requisites (FreeBSD and Linux Debian)
The author of the check_esx_wbem.py script says the script requires python and pywbem.
On a standard FreeBSD machine using ports python can be installed via:-
# cd /usr/ports/lang/python
# make install clean
On a standard Debian machine python can be installed via:-
# apt-get install python2.4
However, there is no pywbem in the ports tree in FreeBSD and as far as I can tell there is no repository for Debian which holds this package, instead you have to build this yourself. First off download the package to your server and extract the package:-
# tar -zxvf pywbem-0.7.0rc1.tar.gz
Now cd to the new directory and build the package:-
# cd pywbem-0.7.0rc1
# python setup.py install
You will now have the correct pre-requisites installed.
Using the check script
First ensure that the script is pointing at the correct location for your python (i.e. open the script with your favorite editor). I had to change this for my FreeBSD machine to point at /usr/local/bin/python.
Now make the script executable:-
# chmod +x check_esx_wbem.py
To run the script against your VMWare server do the following:-
# ./check_esx_wbem.py https://yourserverip:5989 user password
As long as it answers OK then everything is happy!
More Info:-
Please visit the pywbem wiki for more info.
Thanks
A big thanks to the guys who wrote this little script, Tim Potter and Martin Pool.

[...] Source: http://www.ubergeek.co.uk/blog/2008/11/monitoring-hardware-through-vmware-esxi-and-nagios/ http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F2697.html;d=1 [...]