Ok,
For a fresh CentOS 6.3 (64bit) based Nagiosxi virtual appliance (based on the vmware ova file) that has been upgraded to 2012R1.6 do the following in order to install the VMware SDK so you can monitor your ESX hosts.
1. log in as nagiosadmin and go to admin/Manage Config Wizards
2. Check that the vmware wizard is less than 1.4. click the "Check for Updates" button
3. The vmware Wizard should show an update to 1.4. Click download and save it on your machine somewhere.
4. Delete the older wizard and then deploy the new wizard by uploading it.
6. Run the following commands in the terminal logged in as root
Code: Select all
chown nagios.nagcmd /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl
chmod 775 /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl
7. Download the VMware SDK (at time of writing this was VMware-vSphere-Perl-SDK-5.1.0-780721.x86_64.tar.gz) and then SCP the file to /tmp on your nagiosxi server
8. Run the following in the terminal to extract the installer.
Code: Select all
cd /tmp
tar zxf VMware-vSphere-Perl-SDK-5.1.0-780721.x86_64.tar
9. Run the following commands in the terminal as root to install the prerequesities needed by the VMware SDK
Code: Select all
yum clean all
yum install perl-XML-SAX -y
yum install perl-Nagios-Plugin libuuid* perl-XML-LibXML -y
yum install perl-Class-MethodMaker perl-Archive-Zip perl-Data-Dump perl-SOAP-Lite -y
10. You also need to install UUID-0.03 or later, but you can't use yum to do this, so, run the following in the terminal as root
Code: Select all
cd /tmp
wget --directory-prefix=/tmp http://search.cpan.org/CPAN/authors/id/J/JN/JNH/UUID-0.04.tar.gz
tar xzf UUID-0.04.tar.gz -C /tmp
cd /UUID-0.04
perl Makefile.PL
make
make install
11. Run the following from the terminal to autoconfigure CPAN (type y/yes when prompted if you want to autoconfigure)
12. run the following from the terminal as root and follow the prompts (it will pause in places while it tries and fails to use CPAN, but you have installed all the prereqisites now, so should work)
Code: Select all
cd /tmp
export http_proxy=
export ftp_proxy=
cd vmware-vsphere-cli-distrib
./vmware-install.pl
if you do the above and see this...
Code: Select all
This installer has successfully installed both vSphere CLI and the vSphere SDK
for Perl.
The following Perl modules were found on the system but may be too old to work
with vSphere CLI:
Compress::Zlib 2.037 or newer
Compress::Raw::Zlib 2.037 or newer
version 0.78 or newer
IO::Compress::Base 2.037 or newer
IO::Compress::Zlib::Constants 2.037 or newer
LWP::Protocol::https 5.805 or newer
Enjoy,
--the VMware team
then like me, you should now be able to start adding ESX hosts into Nagios.
Big thanks to Nagios support for the assistence in resolving this.
KB.