Nagios monitors vsphere ESXi host hardware status (CPU fan, power module, hard drive, temperature)
Read-only accounts and passwords for ESXi (this article takes chkhardware/chkreadonly as an example)
Insert frame, this address is accompanied by the relevant instructions: http://www.claudiokuenzler.com/nagios-plugins/check_esxi_hardware.php
ESXi Host: DELL R410
ESXi version: ESXI4.0
Configuration
1) check_esxi_hardware.py Copy to Nagios plugin directory/usr/local/nagios/libexec
2) command.cfg
To achieve the following effect:- u user name-p password
Check_esxi_hardware.py-h 192.168.0.130-u chkhardware-p chkreadonly-v Dell
Here's what to add according to the actual environment based on the template: commands.cfg
# ' check_esxi_hardware ' command definition chkhardware/chkreadonly
Define Command{
Command_name Check_esxi_hardware
Command_line $USER 1$/check_esxi_hardware.py-h $HOSTADDRESS $-U $ARG 1$-P $ARG 2$-T $ARG 3$-v $ARG 4$
}
Increase the monitoring host in the host configuration file
# chkhardware/chkreadonly
Define Service{
Use Remote-service
HOST_NAME vsphere.0.xxx
Service_description Check_esxi_hardware
Check_command Check_esxi_hardware!chkhardware!chkreadonly!500!dell
}
Create a new read account to test
#/root/check_esxi_hardware.py-h 192.168.0.130-u chkhardware-p chkreadonly-v Dell
Ok-server:dell Inc. PowerEdge R410 S/n: 2fptv2x System bios:1.3.9 2010-04-07
This script uses the Pyweem module if it is not on the machine and needs to be installed:
Pyweem Module Home: http://pywbem.sourceforge.net/
# wget http://downloads.sourceforge.net/project/pywbem/pywbem/pywbem-0.7/pywbem-0.7.0.tar.gz?r=http%3A%2F% 2fsourceforge.net%2fprojects%2fpywbem%2ffiles%2fpywbem%2f&ts=1299742557&use_mirror=voxel
# TAR-XVZF Pywbem-0.7.0.tar.gz
# CD pywbem-0.7.0
# python setup.py Build
# python setup.py Install
####
Reference Documentation:
Http://www.claudiokuenzler.com/nagios-plugins/check_esxi_hardware.php#PasswordFile
http://blog.163.com/x_b_xuebi/blog/static/59649492201135102817844/
Nagios monitors vsphere ESXi host hardware status (CPU fan, power module, hard drive, temperature)