nagios監控vsphere ESXi主機硬體狀態(CPU風扇、電源模組、硬碟、溫度)

來源:互聯網
上載者:User

標籤:監控 nagios

nagios監控vsphere ESXi主機硬體狀態(CPU風扇、電源模組、硬碟、溫度)

esxi 的唯讀賬戶和密碼(本文以chkhardware/chkreadonly為例)
插架,此地址附有相關說明:http://www.claudiokuenzler.com/nagios-plugins/check_esxi_hardware.php

ESXI主機:DELL R410
ESXI版本:ESXI4.0

配置
1)check_esxi_hardware.py 複製到nagios外掛程式目錄/usr/local/nagios/libexec
2)command.cfg
要實現如下的效果: -U 使用者名稱 -P 密碼
check_esxi_hardware.py -H 192.168.0.130 -U chkhardware -P chkreadonly -V dell
下面這是根據模板,按照實際環境添加的內容:commands.cfg
# ‘check_esxi_hardware‘ command definition   chkhardware/chkreadonly
define command{
        command_name check_esxi_hardware
        command_line $USER1$/check_esxi_hardware.py -H $HOSTADDRESS$ -U $ARG1$ -P $ARG2$ -t $ARG3$ -V $ARG4$
}

增加監控主機,在主機設定檔中
# 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
}

建立一隻讀帳號,進行測試
# /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


這個指令碼用到了PyWEEM模組,如果機器上沒有,需要安裝的:

PyWEEM模組首頁: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

####

參考文檔:

http://www.claudiokuenzler.com/nagios-plugins/check_esxi_hardware.php#PasswordFile


http://blog.163.com/x_b_xuebi/blog/static/59649492201135102817844/


nagios監控vsphere ESXi主機硬體狀態(CPU風扇、電源模組、硬碟、溫度)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.