Page 1 of 1
After Migration to 5.8.1: check_vmware_api_host timeout
Posted: Mon Jan 25, 2021 8:07 am
by rolandkon
A few days ago I upgraded from 5.7.x on Centos 6 to 5.8.1 on Centos 7 (VMware Image).
I did a backup on the old machine, transferred it to the new one and had to update again after that.
Anyway, I could make it all work except for the VMware EsXi checks.
I installed the VMware vSphere Perl SDK. First 6.0.0 that didn't work. Then 7.0.0 which made half the checks work.
I found that the working ones were using check_esx3_host the newer ones were didn't work using check_vmware_api_host.
For now I changed all checks to check_esx3_host, but the wizard uses check_vmware_api_host.
So I hope you can help me with this.
Thanks
RoKo
Re: After Migration to 5.8.1: check_vmware_api_host timeout
Posted: Mon Jan 25, 2021 6:54 pm
by ssax
What is the full output from these commands run from the XI server CLI:
- Change X.X.X.X to your ESXI or vCenter IP
For VM Host:
Code: Select all
/usr/local/nagios/libexec/check_vmware_api.pl -H X.X.X.X -uyouruser -p'yourpassword' -l "CPU" -vvv
For VM Guest:
Code: Select all
/usr/local/nagios/libexec/check_vmware_api.pl -H X.X.X.X -uyouruser -p'yourpassword' -N 'yourvmname' -l "CPU" -vvv
Re: After Migration to 5.8.1: check_vmware_api_host timeout
Posted: Tue Jan 26, 2021 2:04 am
by rolandkon
Thanks for picking this up.
I put in the line for host because I'm only checking the hosts.
After a looong wait (more than a minute) I get the following error:
Code: Select all
CHECK_VMWARE_API.PL CRITICAL - SOAP request error - possibly a protocol issue: <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<LoginResponse xmlns="urn:vim25"><returnval><key>52c79443-e8f6-a297-c4d9-665bfa338f72</key><userName>root</userName><fullName>Administrator</fullName><loginTime>2021-01-26T06:49:54.610019Z</loginTime><lastActiveTime>2021-01-26T06:49:54.610038Z</lastActiveTime><locale>en</locale><messageLocale>en</messageLocale><extensionSession>false</extensionSession><ipAddress>192.168.99.71</ipAddress><userAgent>VI Perl</userAgent><callCount>0</callCou
When I do the same with check_esx3 it takes a second and the result:
Code: Select all
CHECK_ESX3.PL OK - cpu usage=3660.00 MHz (10.91%) | cpu_usagemhz=3660.00MHz;; cpu_usage=10.91%;;
Re: After Migration to 5.8.1: check_vmware_api_host timeout
Posted: Tue Jan 26, 2021 2:47 am
by rolandkon
The error message put me on the right track.
This is what I did:
Code: Select all
# cd /tmp
# wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/libwww-perl-5.837.tar.gz
# tar xvfz libwww-perl-5.837.tar.gz
# cd libwww-perl-5.837
# perl Makefile.PL -l
# make
# make install
Thanks! Works like a charm now.
Re: After Migration to 5.8.1: check_vmware_api_host timeout
Posted: Tue Jan 26, 2021 6:08 pm
by ssax
Awesome, thank you for posting your resolution! Let us know when we're okay to lock this up and mark it as resolved.
Re: After Migration to 5.8.1: check_vmware_api_host timeout
Posted: Wed Jan 27, 2021 2:56 am
by rolandkon
Okay to lock this up. Cheers!
Re: After Migration to 5.8.1: check_vmware_api_host timeout
Posted: Wed Jan 27, 2021 5:46 pm
by benjaminsmith
Hi,
Okay to lock this up. Cheers!
Excellent! Closing.