Issues getting vSphere monitoring working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
kruegerandy
Posts: 7
Joined: Wed Oct 10, 2012 3:22 pm

Issues getting vSphere monitoring working

Post by kruegerandy »

I am currently running Nagios XI version 2012R1.0 and I am having issues getting vmware monitoring working.

I have the SDK installed, and I believe all of the perl modules are OK. I can run the commands via shell such as:
/usr/local/nagios/libexec/check_esx3.pl -H hostname -u username -p password -l mem
and I get valid/expected output.

When I attempt to add a host in the web interface via the "Monitor a VMware host or guest VM. " wizard, I can add a host just fine. None of the services, except ping, will correctly monitor the vm host. I get a error of:
"Critical ESX3 CRITICAL - Server version unavailable at 'https://ferb.ad.uwplatt.edu:443/sdk/vimService.wsdl' at /usr/share/perl5/VMware/VICommon.pm line 545, <AUTH_FILE> line 2."

When I attempt to monitor a vmware guest, at step 3 of the wizzard, in the Guest Selection tab I see the following error:
"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."

I have checked the file permissions mention on the bottom of the "Monitoring_VMware_With_Nagios_XI.pdf" doc.
I have tried several things listed in other postings on the nagios forums.
I have tried reinstalled the VMWare monitoring wizzard.

As I can run the command from the command line, that it appears the individual services seem to be running(with a bit of translation).....how do I get this up and working in the web interface?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Issues getting vSphere monitoring working

Post by lmiltchev »

Please, download and reinstall the VMware Monitoring Wizard by going to:

Admin->Manage Config Wizards->Browse...->Upload Wizard

Rerun the wizard against the host that you are monitoring and see if this is going to fix your problem.
Be sure to check out our Knowledgebase for helpful articles and solutions!
kruegerandy
Posts: 7
Joined: Wed Oct 10, 2012 3:22 pm

Re: Issues getting vSphere monitoring working

Post by kruegerandy »

As I said....I have followed the steps listed on "Monitoring_VMware_With_Nagios_XI.pdf" and re-installed the vmware monitoring wizard several times now. Just to be sure, I did it for a 5th time. I still get the same results.....it does not work.

I reinstalled the wizard via the NagiosXI wizard administration screen. I then logged into the vm, became root and ran:
yum install perl-Nagios-Plugin libuuid* perl-XML-LibXML
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
export http_proxy= export ftp_proxy=
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

When I re-re-install the VMWare SDK I get this at the end:
--------------------------------------------------------------------------------------------------
The installation of vSphere CLI 5.1.0 build-780721 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.

The following Perl modules were found on the system but may be too old to work
with vSphere CLI:

version 0.78 or newer

Enjoy,

--the VMware team
--------------------------------------------------------------------------------------------------

I re-ran the wizard, entering valid info, and selected guest mode. The following error still appears:
--------------------------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------------------------


I have reinstalled all of the perl modules repeatedly, both from cpan and from yum....as below with yum:
yum clean all
yum erase perl-XML-SAX-Base.noarch perl-XML-SAX-0.96-7.el6.noarch perl-Crypt-SSLeay perl-Class-MethodMaker perl-URI lwp
yum install perl-Nagios-Plugin libuuid* perl-XML-LibXML perl-XML-SAX perl-Crypt-SSLeay perl-Class-MethodMaker perl-URI lwp
and re-reinstalled the vmware SDK

I still don't have it working. Do you have any other suggestions? Does the "version 0.78 or newer" line in the VMWare SDK install point to an issue even though the install said it was successful?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issues getting vSphere monitoring working

Post by scottwilkerson »

please run the following from the command line and report the output

Code: Select all

cat /usr/local/nagiosxi/html/includes/configwizards/vmware/vmware.inc.php |grep cmdline
and

Code: Select all

/usr/local/nagios/libexec/check_esx3.pl
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
kruegerandy
Posts: 7
Joined: Wed Oct 10, 2012 3:22 pm

Re: Issues getting vSphere monitoring working

Post by kruegerandy »

Here's the commands and there output:


# cat /usr/local/nagiosxi/html/includes/configwizards/vmware/vmware.inc.php |grep cmdline
$cmdline="/usr/local/nagios/libexec/check_esx3.pl | head --lines=1";
$output=@exec($cmdline);

# /usr/local/nagios/libexec/check_esx3.pl
Usage: check_esx3.pl -D <data_center> | -H <host_name> [ -N <vm_name> ]
-u <user> -p <pass> | -f <authfile>
-l <command> [ -s <subcommand> ]
[ -t <timeout> ] [ -w <warn_range> ] [ -c <crit_range> ]
[ -V ] [ -h ]

Missing argument: command

# /usr/local/nagios/libexec/check_esx3.pl -D servername -f /usr/local/nagiosxi/etc/components/vmware/servername_auth.txt -l runtime -s listhost
ESX3 OK - 6/6 Hosts up: servername(UP), servername(UP), servername(UP), servername(UP), servername(UP), servername(UP) | hostcount=6units;;
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issues getting vSphere monitoring working

Post by scottwilkerson »

Are you still getting this?
kruegerandy wrote:When I attempt to monitor a vmware guest, at step 3 of the wizzard, in the Guest Selection tab I see the following error:
"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."
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
kruegerandy
Posts: 7
Joined: Wed Oct 10, 2012 3:22 pm

Re: Issues getting vSphere monitoring working

Post by kruegerandy »

Yes. I get the same errors in the web interface.


When I attempt to monitor a vmware guest, at step 3 of the wizzard, in the Guest Selection tab I see the following error:
"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."
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issues getting vSphere monitoring working

Post by scottwilkerson »

Ok, one more thing, can you run

Code: Select all

/usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl -H <vSphere_IP> -u <USERNAME>-p <PASSWORD>
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
kruegerandy
Posts: 7
Joined: Wed Oct 10, 2012 3:22 pm

Re: Issues getting vSphere monitoring working

Post by kruegerandy »

I ran the command and I get the following:
----------------------------------------------------------------------
# /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl -H servername.uwplatt.edu -u username -p password
vmname137.104.???.???poweredOn
...
...
...
...
vmname137.104.???.???poweredOff
----------------------------------------------------------------------

In the above, I left out the server names/IP addresses/passwords. In the actual output all ~150 virtual machines in this cluster where listed, with the correct names,ip addresses and power state listed(Some also had the OS and 64/32 bit).

The monitoring vmware wizard still has the same error in the guests selection tab as I had previously posted.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issues getting vSphere monitoring working

Post by scottwilkerson »

Can you post the permissions for this file

Code: Select all

ls -l /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/getguests.pl
And the result of the following

Code: Select all

cat /etc/group|grep nag
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked