注册 登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

涅槃

文档收藏

 
 
 

日志

 
 
 
 

FIX - CHECK_ESX3.PL Script  

2013-06-04 11:39:37|  分类: 监控_nagios |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |


Posted Thu, 07/28/2011 - 08:48 by MWalker

In my Nagios testing I was trying to work with the CHECK_ESX3.PL script to run some scripts against the ESX hosts in the environment. I installed the required VMware vSphere Perl SDK (latest from VMware's site). I was able to run "./check_esx3.pl" without any errors. However when I tried to run an actual check against a host I received:

CHECK_ESX3.PL CRITICAL - Server version unavailable at 'https://172.16.0.81:443/sdk/vimService.wsdl' at /usr/lib/perl5/5.8.8/VMware/VICommon.pm line 545.

I ran across the threads about how the the latest LWP does not like the self-signed certificates. So I added this line to the top of the perl script:
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;

However that did not seem to correct the issue (but it turned out it was one of several issues). I noticed when I rebuilt the VMware vSphere Perl SDK I saw this error:

The following Perl modules were found on the system but may be too old to work
with vSphere CLI:

Compress::Zlib 2.005 or newer
HTML::Parser 3.60 or newer
URI 1.37 or newer
XML::SAX 0.16 or newer

I updated those perl modules as well without seeing a difference. What I eventually did was manually edit the VICommon.pm module. I looked at line 545 which tries to parse the response data. So I added a line to just print out the data prior to that step. That's when I saw the message about a proxy error. Turns out I had http_proxy, ftp_proxy, and https_proxy environment variables set from another idea I had been toying with. I removed the environment variables and I was off and running! So I actually had two issues, the self-signed certificates and the bad proxy environment variables.



http://cache.baiducontent.com/c?m=9d78d513d98217f64fede53a5649c0676915d723788c814268d5e35f93134c403723a2ed793657448dca262147ed5e5d99ed2b37724637b7ec8edf1b87e8c468789f27432141d95c438e45e99c1a63dc74cb10feaf6fb6e0a763caf99399de160ddd53733bd1b0d01846&p=8b2a954fcd9a1efd08e2947d0b48932f&newp=cb65c54ad6c047f90eaac7710d1c902d5c5bc4387ebad7107582c50f&user=baidu&fm=sc&query=/sdk/vimService%2Ewsdl&qid=&p1=10





调试vSphere SDK for Perl 4.1出错

错误信息Server version unavailable at 'https://172.16.10.11:443/sdk/vimService.wsdl' at /usr/lib/perl5/5.14.0/VMware/VICommon.pm line 545.

解决方法,在/usr/lib/vmware-vcli/app中的pl文件中加入下面的代码

#!/usr/bin/perl -w

$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;

即可以忽略不计自签名SSL证书,因为ESX  i服务器的证书就是自签名的。

  评论这张
 
阅读(778)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018