《nagioscacti监控vmwareesi硬件性能VDELL》由会员分享,可在线阅读,更多相关《nagioscacti监控vmwareesi硬件性能VDELL(19页珍藏版)》请在金锄头文库上搜索。
1、Nagios Cacti 监控 dell esxi5 硬件世纪天成Nagios Cacti 监控 Vmware Esxi5 硬件V4.0版本硬件OS软件功能作者V1.0PowerEdge R710Centos6.3x64系统安装运维部V2.0PowerEdge R710Centos6.3x64Nagios pnp4nagiosNagios 监控硬件运维部V3.0PowerEdge R710Vmware esxi5VMware-vSphere-Perl-SDK监控 dell 硬件运维部V4.0PowerEdge R710Centos6.3x64CactiCacti 监控性能运维部一 centos
2、6.3 系统安装,请参看文档 Centos6.3 操作系统安装手册 V2.0.docx (无 base)二 nagios 和 pnp4nagios 安装2.1 # cd cactinagios#sh nagios.sh# pnp4nagios 手动安装三 nagios 监控 Esxi5 硬件3.1 nagios 服务器 安装 VMware-vSphere-Perl-SDK-5.0.0-422456.x86_64(2).tar.gz# yum -y install cpan# tar zxvf VMware-vSphere-Perl-SDK-5.0.0-422456.x86_64(2).tar.
3、gz# export http_proxy=# export ftp_proxy=# yum -y install libuuid libuuid-devel# tar zxvf UUID-0.05.tar.gz# Cd UUID# Perl makefile.pl# Make #./check_esx -H 192.168.188.177 -u root -p 4rfv%TGB -l cpu CHECK_ESX OK - cpu usage=36.00 MHz (0.11%) | cpu_usagemhz=36.00Mhz; cpu_usage=0.11%;3.3 nagios 服务器配置V
4、i command.cfgdefine commandcommand_name check_esxi_hardwarecommand_line $USER1$/check_esxi_hardware.py -H $HOSTADDRESS$ -U $USER11$ -P $USER12$ -V auto# check cpudefine commandcommand_name check_esx_cpucommand_line $USER1$/check_esx -H $HOSTADDRESS$ -u $USER11$ -p $USER12$ -l cpu -s usage -w $ARG1$
5、-c $ARG2$# check memory usagedefine commandcommand_name check_esx_memcommand_line $USER1$/check_esx -H $HOSTADDRESS$ -u $USER11$ -p $USER12$ -l mem -s usage -w $ARG1$ -c $ARG2$# check net usagedefine commandcommand_name check_esx_netcommand_line $USER1$/check_esx -H $HOSTADDRESS$ -u $USER11$ -p $USE
6、R12$ -l net -s usage -w $ARG1$ -c $ARG2$Nagios Cacti 监控 dell esxi5 硬件世纪天成# check runtime statusdefine commandcommand_name check_esx_runtimecommand_line $USER1$/check_esx -H $HOSTADDRESS$ -u $USER11$ -p $USER12$ -l runtime -s status# check io readdefine commandcommand_name check_esx_ioreadcommand_lin
7、e $USER1$/check_esx -H $HOSTADDRESS$ -u $USER11$ -p $USER12$ -l io -s read -w $ARG1$ -c $ARG2$# check io writedefine commandcommand_name check_esx_iowritecommand_line $USER1$/check_esx -H $HOSTADDRESS$ -u $USER11$ -p $USER12$ -l io -s write -w $ARG1$ -c $ARG2$define commandcommand_name check_esx_vmf
8、scommand_line $USER1$/check_esx -H $HOSTADDRESS$ -u $USER11$ -p $USER12$ -l vmfsdefine commandcommand_name check_esx_statuscommand_line $USER1$/check_esx -H $HOSTADDRESS$ -u $USER11$ -p $USER12$ -l $ARG1$ -s $ARG2$Vi hosts.cfgdefine host name esxi5-monitorcontact_groups sagroupcheck_command check-ho
9、st-alivechecks_enabled 0max_check_attempts 2notification_interval 5notification_period 24x7Nagios Cacti 监控 dell esxi5 硬件世纪天成notification_options d,u,rregister 0define host host_name esxi5alias esxi5address 192.168.188.177use esxi5-monitorVi services.cfgdefine service name check_esxi_hardwareservice_
10、description check_esxi_hardwarecheck_command check_esxi_hardwarecheck_period 24x7max_check_attempts 3normal_check_interval 30retry_check_interval 15notification_interval 60notification_period 24x7#notification_options w,u,c,rregister 0define service host_name esxi5-192.168.188.177action_url /pnp4nag
11、ios/index.php/graph?host=$HOSTNAME$# vi include/config.php/* make sure these values refect your actual database/host/user/password */$database_type = “mysql“;$database_default = “cacti“;$database_hostname = “localhost“;$database_username = “cacti“;$database_password = “cacti“;$database_port = “3306“
12、;$database_ssl = false;#vi include/globe.php$database_type = “mysql“;$database_default = “cacti“;$database_hostname = “localhost“;$database_username = “cacti“;$database_password = “cacti“;$database_port = “3306“;$database_ssl = false;Cacti-spine 安装# cd cacti-spine# ./configure -with-mysql=/var/lib/m
13、ysql/makemake installcd /usr/local/spine/etc/mv spine.conf.dist spine.conf#vi spine.conf# crontab u cacti -l*/5 * * * * /usr/bin/php /var/www/html/cacti/poller.php五,五,cacti 监控监控 ESXI 性能性能5.1 cacti 监控 esxi 性能(需要安装 perl 模块,之前有安装过)首先将脚本上传到/cacti/scripts 目录下面get_esxi_cpu.plget_esxi_io.plget_esxi_mem.plg
14、et_esxi_vm.pl# /usr/local/nagios/libexec/check_esx -H 192.168.188.177 -u root -p 4rfv%TGB -l cpu -s usageNagios Cacti 监控 dell esxi5 硬件世纪天成CHECK_ESX OK - cpu usage=0.15 % | cpu_usage=0.15%;# vi /etc/profileexport PERL_LWP_SSL_VERIFY_HOSTNAME=05.2 cacti 创建 CPU Data Input Methods5.3 创建数据模板Data Template
15、s5.4 创建图形模板Graph TemplatesNagios Cacti 监控 dell esxi5 硬件世纪天成5.5 创建 MEM Data Input MethodsNagios Cacti 监控 dell esxi5 硬件世纪天成5.6 创建 Data Templates57 创建图形模板Graph TemplatesNagios Cacti 监控 dell esxi5 硬件世纪天成5.8 创建 IO Data Input MethodsNagios Cacti 监控 dell esxi5 硬件世纪天成5.9 创建 IO 数据模板Data Templates5.9 创建图形模板Graph TemplatesNagios Cacti 监控 dell esxi5 硬件世纪天成Nagios Cacti 监控 dell esxi5 硬件世纪天成5.10 创建 vm count 数据模板Data Input Methods5.11 创建 vm 数据模板Data Templates5.12 创建图形模板Graph TemplatesNagios Cacti 监控 dell esxi5 硬件世纪天成5.13 创建主