Monitoring VMware vCenter

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
npietran
Posts: 7
Joined: Thu Aug 25, 2011 1:14 pm

Monitoring VMware vCenter

Post by npietran »

Good afternoon,

We are installing Nagios XI on RHEL 6 and would like to monitor VMware vCenter and vSphere servers.

Does anyone have and procedures that explain all of the steps required (including software prereqs) to monitor multiple vCenter/vSphere servers?

I have downloaded and installed the VMware vCenter/vSphere monitoring wizard. I am having difficulty in determining how to configure the file(s) that contain the username, password & server for logging in to the servers.

Thanks,

Nick P
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring VMware vCenter

Post by lmiltchev »

Did you read our documentation on the topic? If you haven't, here is the link:

http://assets.nagios.com/downloads/nagi ... ios_XI.pdf

Hope this helps!
Be sure to check out our Knowledgebase for helpful articles and solutions!
npietran
Posts: 7
Joined: Thu Aug 25, 2011 1:14 pm

Re: Monitoring VMware vCenter

Post by npietran »

Yes, I have read the link. I have also installed the VI Perl Toolkit mentioned in the check_vmware.pl.

I am looking for information on how to monitor multiple VMware vCenter hosts. There is a configuration file under /usr/local/nagios/libexec that contains the hostname, username and password for the vCenter host. How do you configure this file when there are multiple vCenter hosts?

Thanks,

Nick P
npietran
Posts: 7
Joined: Thu Aug 25, 2011 1:14 pm

Re: Monitoring VMware vCenter

Post by npietran »

Can anyone assist me with configuring the monitoring of a vCenter host?

Thanks,

Nick P
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Monitoring VMware vCenter

Post by mguthrie »

There's a community written wizard that might do what you need. Take a look and see if it does what you need.
http://exchange.nagios.org/directory/Ad ... rd/details
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Monitoring VMware vCenter

Post by jsmurphy »

I've also been having issues with the VMware wizard, I'm using the provided nagios CentOS VM(2011R1.6)... following the instructions it says to install the x86_64 version of the tools when the VM is 32bit so you need the i386 SDK instead. This got me past the first hurdle of the plugin telling me that the SDK was not installed... However once I got to the guest selection tab on Step 3 it displays the SDK not installed error again.

I've double checked the permissions on getguests.pl:

# ls -l /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl
-rwxrwxr-x 1 nagios nagcmd 5187 May 3 2010 /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl

I then tried to run the check_esx3.pl manually:
# ./check_esx3.pl -H esxserver -u <user> -p <password> -l cpu
ESX3 CRITICAL - Server version unavailable at 'https://esxserver:443/sdk/vimService.wsdl'

I thought this might have something to do with running the 4.0 SDK when we have ESX 4.1 servers so I updated the SDK to 4.1 and ran it again:
# ./check_esx3.pl -H esxserver -u <user> -p <password> -l cpu
ESX3 CRITICAL - Server version unavailable at 'https://esxserver:443/sdk/vimService.wsdl' at /usr/lib/perl5/5.8.8/VMware/VICommon.pm line 545.

If I open a browser and manually browse to the https://esxserver:443/sdk/vimService.wsdl I can see the return XML just fine... hopefully this helps some one diagnose the problem.

Edit: Oh and I still see the SDK not installed error on the Guest selection page after updating the SDK. I've also tried re-installing the SDK/ VM wizard module as recommended in the doc.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Monitoring VMware vCenter

Post by nscott »

Are you sure the ESX vSphere SDK installed completely? It silently exits and doesn't say error, it just stops if it fails. What happens when you try to run the installer for the SDK?
Nicholas Scott
Former Nagios employee
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Monitoring VMware vCenter

Post by jsmurphy »

Fairly sure it's installed correctly:
Do you accept? (yes/no) yes

Thank you.

In which directory do you want to install the executable files?
[/usr/bin]

Please wait while copying vSphere CLI files...

The installation of vSphere CLI 4.1.0 build-254719 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command:
"/usr/bin/vmware-uninstall-vSphere-CLI.pl".

This installer has successfully installed both vSphere CLI and the vSphere SDK
for Perl.

Enjoy,

--the VMware team
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Monitoring VMware vCenter

Post by nscott »

Try manually running the plugin from the command line

/usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl -H <your ESX> -u <user to login as> -p <password for said user>

If that doesn't roll, then the SDK is messed up. Once that rolls, then set the permissions properly (by allowing apache to execute it) and try it in Nagios XI.
Nicholas Scott
Former Nagios employee
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: Monitoring VMware vCenter

Post by jsmurphy »

Same deal as running the check_esx3.pl:
# ./getguests.pl -H <esx host> -u <user> -p <pw>
Server version unavailable at 'https://<esx host>:443/sdk/vimService.wsdl' at /usr/lib/perl5/5.8.8/VMware/VICommon.pm line 545.
results from manually browsing https://<esx host>:443/sdk/vimService.wsdl
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:interface="urn:vim25" targetNamespace="urn:vim25Service">
<import location="vim.wsdl" namespace="urn:vim25"/>
<service name="VimService">
<port binding="interface:VimBinding" name="VimPort">
<soap:address location="https://localhost/sdk/vimService"/>
</port>
</service>
</definitions>
In the above, as far as I can see there is no server version in the XML available on the ESX host.

Are there any versions of the SDK or ESX you are aware it doesn't actually work for? Does it work for both ESX and ESXi?
Locked