So I got a hard mission, monitor a VMWare ESX 3 Server. I thought it would be easy but I was wrong.
Of course I did with Nagios/Centreon, at first I tried SNMP without much success. So I found out that a smart guy somewhere had gone thru the pain of delevoping some quite amazing script that would do just what I needed.
This guy is Steve Shipway and his site/forum has much information http://www.steveshipway.org/forum/viewforum.php?f=28.
I will focus in monitoring the Server ESX, not its VM hosts.
Well here are the stpes I did in order to have it “almost” working they way I wanted:
INSTALLING VMware-VIPerl on Debian
1. Install the (Perl) VMware VI API library on your Nagios server, where the check_vmware and check_esx3 plugins will run. You can download this from the VMware website.
Download (version Released : 1.6.0 | 07/25/08 | 104313 )
# wget http://www.xoroz.com/files/VMware-VIPerl.tar.gz
# tar -zxvf VMware-VIPerl.tar.gz
# install Class::MethodMaker SOAP::Lite
Requirements for XML:LibXML
# apt-get install libxml2-dev
also it should auto install dependency XML::LibXML::Common
# install XML::LibXML
# install UUID
I had major problems trying to install UUID Tried:
installing Data::UUID (still not what it wants)
UUID 0.3 (UNAUTHORIZED INSTALL)
I have tried even UUID 0.2 and also the ubuntu uuid_1.5.1-1.1ubuntu1_i386.deb, could not compile any of them
Other people have had these problem, check out post here:
went on installing with the WARNING of UUID not found.
# perl Makefile.PL
# make install
2. Run the check_vmware from the Nagios server to the Virtual Center Server (or direct to the ESX Server). The guest plugins of course run vian NRPE on the guests.
Download the Check_Vmware (right now on BETA 2) ref. here
# wget http://www.xoroz.com/files/scripts/nagios/esx_monitor.zip
# unzip esx_monitor.zip
# cd VMWare
# cp *.* /usr/local/nagios/libexec/
./check_vmware.pl –config=configvm.txt –report=cpu
(Be sure this user can login into the Virtual Center Admin Tool)