我尝试执行 shinken 插件:/var/lib/shinken/libexec/check_esx3.pl。失败了。
error CHECK_ESX3.PL CRITICAL - Server version unavailable at 'https://dc-srv03.rthd.intra:443/sdk/vimService.wsdl' at /usr/share/perl5/VMware/VICommon.pm line 726.
行命令为:
/var/lib/shinken/libexec/check_esx3-0.5.pl -H dc-srv03.rthd.intra -u 'xxxxx' -p 'xxxxxxx' -l runtime -s list
此命令提供虚拟机的列表。
在 VICommon 的第 726 行我们有:
my $xml_parser = XML::LibXML->new;
my $result;
eval { $result = $xml_parser->parse_string($response->content) };
if ($@) {
die "Server version unavailable at '$url'";
}
我尝试重新安装 rpm 包:perl-XML-LibXML-1.70-5.el6.x86_64 和 perl-libxml-perl-0.08-10.el6.noarch,并成功。
当我执行插件时仍然失败。你能帮助我吗?操作系统 centos 6.7 perl 版本 v5.10.1 非常感谢。
答案1
是的,没有安全选项(-k
)
curl -k https://172.28.255.6:443/sdk/vimService.wsdl
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2005-2016 VMware, Inc. All rights reserved.
-->
<definitions targetNamespace="urn:vim25Service"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:interface="urn:vim25"
>
<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>