新聞中心
Nagios監(jiān)控HP硬件狀態(tài)
一,監(jiān)控思想
創(chuàng)新互聯(lián)堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:成都網(wǎng)站制作、做網(wǎng)站、外貿(mào)營(yíng)銷網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時(shí)代的桐梓網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!可以使用兩種模式,check_nrpe方式和SNMP方式,這里我們采用SNMP代理方式。
兩種方式都依賴HP的ProLiant Support Pack(PSP)軟件包,有兩種方式安裝PSP包,一種tar包,一種RPM包,經(jīng)過(guò)實(shí)踐tar包很難安裝,所以最終采用rpm包方式。
二,實(shí)施步驟
1,到 http://downloads.linux.hp.com/SDR/getting_started.html 下載 add_repo.sh 腳本,并上傳到HP服務(wù)器。
2,用root用戶登錄,在服務(wù)器上執(zhí)行以下命令:
chmod 700 add_repo.sh
./add_repo.sh spp -d rhel -r 6Server -y hp.repo
(運(yùn)行該腳本后會(huì)在/etc/yum.repos.d/生成一個(gè)hp.repo文件,
-d linux的發(fā)行版本,如 rhel、centos,
-r linux版本,如6server,
-y 指定yum客戶端的配置文件的名稱,如hp.repo)
yum -y install hp-health hpacucli hp-smh-templates hpacucli
3,我們先命令行檢測(cè)下:
hpacucli ctrl all show config
hpacucli ctrl slot=0 show config detail(陣列詳細(xì)信息)
上面命令執(zhí)行正確,會(huì)出現(xiàn)以下信息:
4,修改 snmpd.conf 配置文件,在文件最后加上以下內(nèi)容,并修改公共字符串。
vi /etc/snmp/snmpd.conf
# Following entries were added by HP Insight Management Agents at
dlmod cmaX /usr/lib64/libcmaX64.so
rwcommunity hp 127.0.0.1
rocommunity sou_shi 0.0.0.0
rwcommunity sou_shi 127.0.0.1
rocommunity sou_shi default -V systemonly
trapcommunity hp
trapsink localhost sou_shi
5,重新啟動(dòng)SNMP服務(wù)
/etc/init.d/snmpd restart
6,啟動(dòng)HP檢測(cè)服務(wù)
/etc/init.d/hp-snmp-agents start
/etc/init.d/hp-health start
7,安裝nagios服務(wù)端監(jiān)控
在nagios服務(wù)器端安裝 check_hpasm-4.6.3.tar.gz,軟件下載地址如下: http://labs.consol.de/lang/en/nagios/check_hpasm/
tar -zxvf check_hpasm-4.6.3.tar.gz
./configure --prefix=/usr/local/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-degrees=celsius --enable-hpacucli --enable-hwinfo --enable-extendedinfo --enable-perfdata
make && make install
先用命令行進(jìn)行測(cè)試:
/usr/local/nagios/libexec/check_hpasm --hostname 192.168.1.224 -C sou_shi
如果命令行正確,會(huì)出現(xiàn)下面的信息:
8,修改nagios配置文件
commands.cfg 內(nèi)容如下:
############################## hp_monitor ########################
define command {
command_name check_hp_hardware
command_line /usr/local/nagios/libexec/check_hpasm -H $HOSTADDRESS$ -C sou_shi
}
被監(jiān)控主機(jī) 配置內(nèi)容如下:
########################## hp_monitor ##################################
define service {
use hp-service
host_name 192.168.1.223
service_description check_hp_hardware
check_command check_hp_hardware
}
8,最終監(jiān)控效果圖
異常狀態(tài)圖:
參考文獻(xiàn):
http://kyle.xlau.org/posts/nagios-plugin-for-HP.html
http://labs.consol.de/lang/en/nagios/check_hpasm/
https://alteeve.ca/w/HP-Specific_Notes
http://www.it-slav.net/blogs/2010/03/02/monitor-hp-proliant-with-nagios-or-op5-monitor/
http://downloads.linux.hp.com/SDR/getting_started.html
http://2528332.blog.51cto.com/2518332/972291
http://www.linuxde.net/2013/07/14885.html
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。
當(dāng)前文章:Nagios監(jiān)控HP硬件狀態(tài)-創(chuàng)新互聯(lián)
URL標(biāo)題:http://fisionsoft.com.cn/article/csjces.html