Home > HowTo, Nagios, plugins > ESX monitoring

ESX monitoring

February 4th, 2009 Leave a comment Go to comments

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 requirements:
# cpan
# install Class::MethodMaker SOAP::Lite
Requirements for XML:LibXML
# apt-get install libxml2-dev
also it should auto install dependency XML::LibXML::Common
# cpan
# 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)
wget http://search.cpan.org/CPAN/authors/id/C/CF/CFABER/UUID-0.03.tar.gz
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:
http://www.cygwin.com/ml/cygwin/2008-11/msg00100.html
went on installing with the WARNING of UUID not found.
Installation:
# 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
Get Beta2:
# 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

configvm.txt:
VI_PASSWRD=pass
VI_SERVER=192.168.0.1
VI_USER=user1
(Be sure this user can login into the Virtual Center Admin Tool)

  1. February 9th, 2009 at 06:45 | #1

    We’re up to 0.8beta now, which has much more controllability, plus it can forward information for individual guests to Nagios via NSCA (so you run just one active service memory check for your cluster, and it updates all the guest passive services at the same time)

    Performance can suck but that’s down to the Virtual Centre API, sadly. Apparently things will improve with v4, they say.

  2. George
    November 3rd, 2011 at 19:39 | #2

    I solved the UUID issue by installing libuuid-devel (in redhat: yum install libuuid-devel)

  3. GCleric
    November 22nd, 2011 at 14:24 | #3

    …and for ubuntu you need use…

    sudo apt-get install uuid-dev

  1. March 1st, 2009 at 08:10 | #1

VAMOVE *

*