Вы находитесь на странице: 1из 3

Nagios XI Monitoring VMware With Nagios XI

The Industry Standard in IT Infrastructure Monitoring


Purpose
This document describes how to use Nagios XI to monitor VMware ESX, ESXi, vSphere, and vCenter Server with the VMware
monitoring wizard. This document will show you how to set up your Nagios XI system to monitor virtual machines (VMs) deployed on
these products.

Target Audience
This document is intended for use by Nagios XI administrators who are familiar with VMware's virtualization products and know how to
install and configure software on Linux servers.

Requirements
Must be running Nagios XI 2012R1.0 or later to use this documentation.

Installation Overview
In order to monitor VMware with Nagios XI, you will need to:

Install the prerequisites for the VMware SDK


Install the VMware Perl SDK on the Nagios XI server

Install SDK Prerequisites


Newer versions of VMware Perl SDK require outside installation of perl modules and the definition of some environment variables. To
get things started lets first install the Perl modules required, from the terminal on your Nagios XI server as the root user:
yum erase perl-XML-SAX-Base -y
yum install perl-XML-SAX --exclude=perl-XML-SAX-Base -y
yum install perl-Nagios-Plugin libuuid* perl-XML-LibXML
Finally, lets set the environment variables the SDK requires. Notice that in the following example we are NOT using a proxy server, so
I'll just leave it blank. However, if you are using a proxy server then you will need to enter the address of it where I have left it blank:
export http_proxy=
export ftp_proxy=

Installing the SDK


We are unable to pre-bundle the VMware Perl SDK with Nagios XI due to the license terms, so you will need to download and install
the SDK on the Nagios XI server yourself. You can download the VMware Perl SDK from VMware's website at the following address:
http://communities.vmware.com/community/developer/forums/vsphere_sdk_perl
Download the SDK file using a graphical web browser (so that you can accept the terms), then you can transfer it to the Nagios XI
server via SFTP. For this you can use Putty(sftp), Filezilla, or your favorite transfer program.
Upload the SDK to the Nagios XI machine's /tmp directory and execute the following commands to install the SDK (the name of the
SDK tarball may differ for you). Also remember that you need to download the proper SDK for your architecture. In this example we
used a 64-bit SDK, your architecture may differ.

Nagios Enterprises, LLC


P.O. Box 8154
Saint Paul, MN 55108
USA

US: 1-888-NAGIOS-1
Int'l: +1 651-204-9102
Fax: +1 651-204-9103

Web: www.nagios.com
Email: sales@nagios.com

Page 1
Copyright 2010 - 2014 Nagios Enterprises, LLC
Revision 1.0 August, 2014

Nagios XI Monitoring VMware With Nagios XI


cd /tmp
tar xzf VMware-vSphere-SDK-for-Perl-4.0.0-161974.x86_64.tar.gz
cd vmware-vsphere-cli-distrib/
./vmware-install.pl
Follow the on-screen instructions to complete the installation of the SDK.

Using the VMware Wizard


You are now ready to use the VMware Wizard. From the Nagios XI web interface, navigate to
Configure Run the Monitoring Wizard and select the VMware wizard.
Enter the IP Address of your VM server, Username and Password. You also
need to select a Monitoring Mode: select Monitor the VMware Host if you are
only concerned with the VMware server, and select Monitor a guest VM on the
VMWare host if you want to monitor a specific VM. For this example we will
only monitor the VMware server. Click Next.

In Step 3 select the metrics you want to monitor. For this example we will monitor CPU
Usage and VM Status. Click Next.
Follow the wizard by clicking on the Next button in Step 4 Step 6. In these steps set
monitoring and notification options, as well as group memberships will be inherited from
the template host and services you selected. Click Finished at any point to accept the
default values.

Finally, you can see your service checks in action by navigating to Home Service Detail and finding your new host.

Nagios Enterprises, LLC


P.O. Box 8154
Saint Paul, MN 55108
USA

US: 1-888-NAGIOS-1
Int'l: +1 651-204-9102
Fax: +1 651-204-9103

Web: www.nagios.com
Email: sales@nagios.com

Page 2
Copyright 2010 - 2014 Nagios Enterprises, LLC
Revision 1.0 August, 2014

Nagios XI Monitoring VMware With Nagios XI


Common Problems
Below are some common problems encountered when using the VMware wizard.
The wizard shows a big red box that says the VMware SDK isn't installed. I installed it, what could cause this?
Reinstall the VMware SDK. Its very easy to pass over an error in that install script. If you don't see Enjoy, --the VMware team" at the
end of the install, then it did not install properly. The other thing that can cause this is the check_esx3.pl not existing in
/usr/local/nagios/libexec. If this error persists past Vmware SDK reinstall, then reinstall the wizard. If it persists past the wizard install,
then manually place check_esx3.pl into /usr/local/nagios/libexec directory.
When I try to monitor guests on an ESX host, it populates the checkboxes properly, but under the Guest Selection tab it
simply says:
It appears as though the VMware SDK has not yet been installed on your Nagios XI server. You must install the SDK before you are
able to use this wizard.
As you can guess this can happen when you haven't installed the SDK. However, if you've installed the SDK, make sure you've
properly set the permissions for getguests.pl as this has been an issue for some users.
All of my service names are slightly different. The quotes are gone!
This had to be done. Nagios service and host names cannot contain special characters and as such they were removed automatically
due remove Error In Configuration messages and show-stoppers. If you wish to have absolute control over your service names, make
sure they do not involve any shell characters or Nagios illegal characters.

Finishing Up
This concludes the install and use of the VMware wizard. If you have any additional support issues that you cannot resolve, please,
post your questions on the Nagios Support Forum:
http://support.nagios.com/forum/

Nagios Enterprises, LLC


P.O. Box 8154
Saint Paul, MN 55108
USA

US: 1-888-NAGIOS-1
Int'l: +1 651-204-9102
Fax: +1 651-204-9103

Web: www.nagios.com
Email: sales@nagios.com

Page 3
Copyright 2010 - 2014 Nagios Enterprises, LLC
Revision 1.0 August, 2014

Вам также может понравиться