Welcome 微信登录

首页 / 操作系统 / Linux / Nagios监控Vmware ESXI 5.0

1.下载vSphere SDK for Perl
http://www.vmware.com/support/developer/viperltoolkit/index.html
解压,运行
export http_proxy=
export ftp_proxy=
./vmware-install.pl回车即可。
在安装sdk时,安装脚本使用cpan安装perl模块,会有一些perl模块安装不上,这些安装不上的模块,得手动使用cpan去安装,若还安装不上那么就用yum去安装,例如 UUID,
error:installed manuallyfor use by vSphere CLI:
UUID 0.03 or newer解决:
1)yum install perl-SOAP-Lite perl-Data-Dumpperl-Class-MethodMaker perl-Crypt-SSLeay perl-libxml-perlperl-XML-LibXML-Common libuuid-devel  uuid-perl  -y2)perl -MCPAN -e"install UUID"
##
……In which directorydo you want to install the executable files?
[/usr/bin]
Please wait whilecopying vSphere CLI files...
The installation ofvSphere CLI 5.0.0 build-615831 for Linux completed
successfully. You candecide to remove this software from your system at any
time by invoking thefollowing command:
"/usr/bin/vmware-uninstall-vSphere-CLI.pl"……………..有时因为网络的连通状况,还需要设置cpan的urllist#install Nagios::Plugin 使用 i/Implementation/方式查询;
yum install perl-CPAN
perl -MCPAN -e shell 
install YAML
install HTML::Parser
install URI
install Compress::Zlib
install Module::Runtime    //如果这里最后报错,重启下再insatll就成功了
reboot
install Module::Runtime 
install Module::Implementation
install Attribute::Handlers
install Params::Validate 
install Nagios::Plugin2.然后下载监控插件:http://exchange.nagios.org/directory/Plugins/Operating-Systems/*-Virtual-Environments/VMWare/Vmware-ESX-%26-VM-host/details
check_esx3.pl  记得给执行权限。
测试:/usr/local/nagios/libexec/check_esx3.pl –help #显示帮助信息证明安装成功
Error:
[root@nagios libexec]#./check_esx3.pl  -H 10.168.0.109 -u root-p "w4n9w3i_!1" -l cpu
CHECK_ESX3.PL CRITICAL -Server version unavailable at "https://10.168.0.109:443/sdk/vimService.wsdl" at/usr/share/perl5/VMware/VICommon.pm line 545.
解决:修改check_esx3.pl脚本:添加参数
#!/usr/bin/perl -w
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0;
#
# Nagios plugin to monitor vmware esxservers
测试:
[root@nagioslibexec]# ./check_esx3.pl  -H10.168.0.109 -u root -p "w4n9w3i_!1" -l cpu
CHECK_ESX3.PL OK -cpu usage=55.00 MHz (0.12%) | cpu_usagemhz=55.00Mhz;; cpu_usage=0.12%;;Nagios 的详细介绍:请点这里
Nagios 的下载地址:请点这里相关阅读:网络监控器Nagios全攻略 http://www.linuxidc.com/Linux/2013-07/87067.htmNagios搭建与配置详解 http://www.linuxidc.com/Linux/2013-05/84848.htmNginx环境下构建Nagios监控平台 http://www.linuxidc.com/Linux/2011-07/38112.htm在RHEL5.3上配置基本的Nagios系统(使用Nagios-3.1.2) http://www.linuxidc.com/Linux/2011-07/38129.htmCentOS 5.5+Nginx+Nagios监控端和被控端安装配置指南 http://www.linuxidc.com/Linux/2011-09/44018.htmUbuntu 13.10 Server 安装 Nagios Core 网络监控运用 http://www.linuxidc.com/Linux/2013-11/93047.htm关于Linux字符集的查看及修改试用64位 Ubuntu GNOME 14.04 遇到 FLASH 插件安装问题相关资讯      Nagios监控 
  • Nagios(centreon)监控LVS  (09/25/2015 07:53:39)
  • Linux下安装配置Nagios监控  (07/23/2015 14:39:23)
  • /run/user/1000/gvfs is not   (06/12/2015 19:30:20)
  • Nagios(centreon)监控Linux日志  (09/25/2015 07:51:24)
  • 如何用 Nagios 监控通用服务  (07/02/2015 20:05:53)
  • Nagios监控ESXi硬件  (06/11/2015 11:51:49)
本文评论 查看全部评论 (0)
表情: 姓名: 字数