Page 1 of 1

[Solved] VMware - check_esx3.pl takes minutes to run.

Posted: Mon Dec 02, 2013 4:59 pm
by tysonedwards
I have been trying to get some vSphere hosts added to my monitoring environment using the check_esx3.pl script that is included with XI, however I am running into some issues.

The command that I am running is:

[root@statistics ~]# time /usr/local/nagios/libexec/check_esx3.pl -H "10.1.1.101" -f "/usr/local/nagiosxi/etc/components/vmware/Vmhost_auth.txt" -l CPU
ESX3 OK - cpu usage=7084.00 MHz (9.62%) | cpu_usagemhz=7084.00Mhz;; cpu_usage=9.62%;;

Test 1:
real 3m49.388s
user 0m0.594s
sys 0m0.045s

Test 2:
real 3m47.660s
user 0m0.387s
sys 0m0.037s

Test 3:
real 3m49.840s
user 0m0.576s
sys 0m0.038s

This behavior has been observed consistently over the past few weeks.

Even if I specify a timeout (such as '-t 30'), the command will continue to run past 30 seconds and return the result in the end.

I have tested hosts that are running ESXi 5.0, 5.1 with identical behavior.
ESXi 5.5 running the same script gives the following error, again at 3m48s.

[root@statistics ~]# time /usr/local/nagios/libexec/check_esx3.pl -H "10.1.1.104" -f "/usr/local/nagiosxi/etc/components/vmware/Vmhost_auth.txt" -l CPU
ESX3 CRITICAL - HOST CPU Unknown error

real 3m48.408s
user 0m0.395s
sys 0m0.031s

Due to the very long time to run, within Nagios the command will ultimately offer Status: (Service Check Timed Out).

OS: CentOS 6.5 (x86-64)
Nagios XI Version: 2012R2.7 Enterprise
Installation Source: VMDK
CPU: 4 Cores presented via vSphere on a dual socket AMD Opteron 6376 server.
Memory: 8GB presented via vSphere on a 128GB server.
Storage: 60GB presented via vSphere on a 4TB SSD server.

Load Average: 0.02, 0.03, 0.08

When I originally installed from VMDK, it was on a previous version of XI. I don't remember specifically.
After experiencing this issue for several weeks and not making headway, I upgraded to 2012R2.7 via the Source Installer and did a 'yum update' to go to CentOS 6.5.

I am not averse to re-installing if need be, or going with an alternate installation path.

Of note, no other service checks are experiencing this long execution time issue.

Any assistance on this matter would be greatly appreciated.

Re: VMware - check_esx3.pl takes minutes to run.

Posted: Mon Dec 02, 2013 5:18 pm
by abrist
Are any of these ESX servers over-taxed/high io/under high load?

I found a few possible causes, though the big one seems to be issues with the vmware sdk dependencies. What version of the esx wizard are you running?

You could try:

Start cpan shell:

Code: Select all

perl -MCPAN -e shell
In the shell, type:

Code: Select all

install GAAS/Net-HTTP-6.03.tar.gz

Re: VMware - check_esx3.pl takes minutes to run.

Posted: Mon Dec 02, 2013 11:29 pm
by tysonedwards
The servers are not being overtaxed.

On the most used node, CPU averages 22%, memory has at least 7GB free, and 200GB of SSD.

After installing the package that you recommended, I am no longer able to query the servers and receive the following error message:
[root@statistics ~]# /usr/local/nagios/libexec/check_esx3.pl -H "10.1.1.101" -f "/usr/local/nagios
i/etc/components/vmware/Vmhost_auth.txt" -l "CPU"
ESX3 CRITICAL - SOAP request error - possibly a protocol issue: Undefined subroutine &LWP::Protoco
l::https::Socket::can_read called at /usr/local/share/perl5/LWP/Protocol/http.pm line 22

Re: VMware - check_esx3.pl takes minutes to run.

Posted: Mon Dec 02, 2013 11:32 pm
by tysonedwards
As a side note, we do have support for XI however my account will not let me access that portion of the site. Any chance that after we get this issue sorted out that I can be given the appropriate permissions to access that forum?

Re: VMware - check_esx3.pl takes minutes to run.

Posted: Tue Dec 03, 2013 10:41 am
by tmcdonald
tysonedwards wrote:As a side note, we do have support for XI however my account will not let me access that portion of the site. Any chance that after we get this issue sorted out that I can be given the appropriate permissions to access that forum?
I'll contact sales and have them add you. Can you PM me your account ID and associated email address please?

Re: VMware - check_esx3.pl takes minutes to run.

Posted: Tue Dec 03, 2013 4:46 pm
by tysonedwards
After further experimentation, it seems as though a previous version of libwww-perl was needed.

GAAS/libwww-perl-5.837.tar.gz

Issue is now solved.

Re: VMware - check_esx3.pl takes minutes to run.

Posted: Tue Dec 03, 2013 4:53 pm
by tmcdonald
tysonedwards wrote:After further experimentation, it seems as though a previous version of libwww-perl was needed.

GAAS/libwww-perl-5.837.tar.gz

Issue is now solved.
Awesome. Also, Sales got back to me and you should be all set for the customer forums now. Gonna lock up this thread.