昨天装备通过check_esx3.pl监控一台新的esxi4.1虚拟化,但是在终端上执行检测命令是出现Server version unavailable的错误:
/usr/local/nagios/libexec/check_esx3.pl -H 172.16.10.11 -u root -p password -l cpu CHECK_ESX3.PL
CRITICAL - Server version unavailable at 'https://172.16.10.11:443/sdk/vimService.wsdl' at /usr/lib/perl5/5.8.8/VMware/VICommon.pm line 545.
网上查询了一些资料,根据http://www.claudiokuenzler.com/blog/210/check_esx3.pl-error-server-version-unavailable-lwp-ssl所说
At the begin I thought there might be a compatibility problem between the Perl API 5.0 and the ESX server which runs on 4.1, but after a short research, the problem comes from the Perl module LWP, as MWalker describes it on this page.
The solution to this problem is to add a parameter to check_esx3.pl to tell LWP that the self-signed SSL certificate (as they are by default on ESX/i servers) can be ignored
用Google翻译过来就是:
对这个问题的解决办法是添加一个参数,,以check_esx3.pl告诉LWP的,可以忽略不计,自签名的SSL证书(因为他们的ESX / i服务器的默认):(吐槽:俺英语不行呀,Google翻译虽然一些语法和专业名词可能不对,但还是能看懂了)
#!/usr/bin/perl -w
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
#
# Nagios plugin to monitor vmware esx servers
#
# License: GPL
然后再手动检查一次可以了
/usr/local/nagios/libexec/check_esx3.pl -H 172.16.10.11 -u root -p password -l cpu
CHECK_ESX3.PL OK - cpu usage=7296.00 MHz (35.76%) | cpu_usagemhz=7296.00Mhz;; cpu_usage=35.76%;;
终于搞定了
你好,麻烦请教个问题,nagios 监控esxi ,esxi 服务器需要做啥配置不?