ESX host list from a specified DC
ESX host list from a specified DC
HI All,
I am facing challenges to get the esx hosts list from the specified DC,i can get the VM's list from the specified esx hosts, but i am struggling to get it from the linux servers.
i am using the script check_esx3-0-5 (https://exchange.nagios.org/directory/P ... st/details) to get the all the VM's list from the esx host, but i am getting below error while i am using the same script.
Error : Server version unavailable at 'https://<DC>:443/sdk/vimService.wsdl' at /usr/share/perl5/VMware/VICommon.pm line 726
Command : ./check_esx3-0-5 -D <DC name> -H <vcenter hostname> -u <username> -p <password> -l runtime -s listhost
not sure whether i am using the command in wrong way, if yes can someone help in this regards,
appreciate your help, and thanks in advance.
I am facing challenges to get the esx hosts list from the specified DC,i can get the VM's list from the specified esx hosts, but i am struggling to get it from the linux servers.
i am using the script check_esx3-0-5 (https://exchange.nagios.org/directory/P ... st/details) to get the all the VM's list from the esx host, but i am getting below error while i am using the same script.
Error : Server version unavailable at 'https://<DC>:443/sdk/vimService.wsdl' at /usr/share/perl5/VMware/VICommon.pm line 726
Command : ./check_esx3-0-5 -D <DC name> -H <vcenter hostname> -u <username> -p <password> -l runtime -s listhost
not sure whether i am using the command in wrong way, if yes can someone help in this regards,
appreciate your help, and thanks in advance.
Re: ESX host list from a specified DC
Can you run your check again from the command line with "increased verbosity" (pass "-v", "-vv" or "-vvv"; whatever the plugin supports)?
BTW, I have seen similar issues resolved by adding the following line to the top of the plugin:
BTW, I have seen similar issues resolved by adding the following line to the top of the plugin:
Code: Select all
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: ESX host list from a specified DC
Thanks lmiltchev, appreciate your prompt response ,
i used -v , nothing more it is giving, and also i add the line $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; at the begging of the file (after !#/usr/bin/perl) , but still getting the same error.
Thanks again for your response.
i used -v , nothing more it is giving, and also i add the line $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; at the begging of the file (after !#/usr/bin/perl) , but still getting the same error.
Thanks again for your response.
Re: ESX host list from a specified DC
I saw another person with this problem solve it by installing this package: perl-LWP-Protocol-https in addition to adding the $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; as ludmil suggested.
/Luke
Re: ESX host list from a specified DC
Hi lgroschen,
Thanks for your response , but no luck, still getting the same error.
I have installed perl-LWP-Protocol-https , do i need it add line "use LWP::Protocol:https " something like this.
Thanks in advance.
Thanks for your response , but no luck, still getting the same error.
I have installed perl-LWP-Protocol-https , do i need it add line "use LWP::Protocol:https " something like this.
Thanks in advance.
Re: ESX host list from a specified DC
Yes, try adding what @lmiltchev mentioned at the top of the plugin.anil4u_04 wrote:Hi lgroschen,
Thanks for your response , but no luck, still getting the same error.
I have installed perl-LWP-Protocol-https , do i need it add line "use LWP::Protocol:https " something like this.
Thanks in advance.
Former Nagios Employee
Re: ESX host list from a specified DC
Thanks rkennedy , i have added what lmiltchev suggested, but still no luck
Any help will be much appropriated.
Thanks.
Any help will be much appropriated.
Thanks.
Re: ESX host list from a specified DC
Are you testing from the command line or after restarting nagios and through the interface? I'm wondering if it's a permissions/path issue for the nagios user.
Thank you
Thank you
Re: ESX host list from a specified DC
I am testing from the command line. That script works for all options for the singe esx servers, but when i am giving DC options it is giving the below error.
root@<servername>:~# /usr/local/nagios/libexec/check_esx3-0-5 -D <DC> -H <vcenter hostname> -u <username> -p <password> -l runtime -s listhost
ESX CHECK CRITICAL - Server version unavailable at 'https://<DC>:443/sdk/vimService.wsdl' at /usr/share/perl5/VMware/VICommon.pm line 726.
root@<servername>:~#cat /usr/local/nagios/libexec/check_esx3-0-5 | grep ENV
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
root@<servername>:~#ls -l /usr/local/nagios/libexec/check_esx3-0-5
-rwxr-xr-x 1 root root 132917 Sep 3 00:19 /usr/local/nagios/libexec/check_esx3-0-5
root@<servername>:~#
root@<servername>:~# /usr/local/nagios/libexec/check_esx3-0-5 -D <DC> -H <vcenter hostname> -u <username> -p <password> -l runtime -s listhost
ESX CHECK CRITICAL - Server version unavailable at 'https://<DC>:443/sdk/vimService.wsdl' at /usr/share/perl5/VMware/VICommon.pm line 726.
root@<servername>:~#cat /usr/local/nagios/libexec/check_esx3-0-5 | grep ENV
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
root@<servername>:~#ls -l /usr/local/nagios/libexec/check_esx3-0-5
-rwxr-xr-x 1 root root 132917 Sep 3 00:19 /usr/local/nagios/libexec/check_esx3-0-5
root@<servername>:~#
Re: ESX host list from a specified DC
It looks like the command line options is either -H or -D but not both. Try just using the -D option.
Try that and let us know if it works.
Try that and let us know if it works.
Be sure to check out our Knowledgebase for helpful articles and solutions!