linux命令 centos linux nginx google 开源 Windows HTML5 mysql Ubuntu wordpress 程序员 shell 微软 java Python apache Android Firefox php

hugwww-hp sl4540 gen8 硬件监控Nagios

hp服务器硬件监控nagios,通过check_hp

hp sl4540 gen8硬件监控

1.nagios端配置

http://exchange.nagios.org/directory/Plugins/Hardware/Server-Hardware/HP-%28Compaq%29/check_hp/details

最新版check_hp-2.11.tar.gz

http://www.crowdedplace.com/category/check_hp/

将check_hp解压到

/usr/local/nagios/libexec
./check_hp -H 192.168.50.7 -C public

2.hp服务器配置

ubuntu12.04官方源

echo “deb http://downloads.Linux.hp.com/SDR/downloads/MCP/Ubuntu  precise current/non-free” >> /etc/apt/sources.list

apt-get update
apt-get install hp-snmp-agents hpsmh hp-smh-templates hpacucli hp-health camping  lib32gcc1

/sbin/hpsnmpconfig 可以配置snmp服务 添加HP服务器监控用的MIB信息

或者直接在/etc/snmp/snmpd.conf文件开头加上下面内容即可(等同于使用上面的命令)

# Following entries were added by HP Insight Management Agents at
#      Tue May  7 16:47:03 CST 2013
dlmod cmaX /usr/lib/libcmaX64.so
rwcommunity hp 127.0.0.1
rocommunity public 0.0.0.0
rwcommunity  public 127.0.0.1
rocommunity public default    -V systemonly
trapcommunity hp
trapsink     localhost public
# ———————- END ——————–

agentAddress  udp:127.0.0.1:161改为
agentAddress  udp:0.0.0.0:161

把/etc/default/snmpd 中的

SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid’

修改为:

SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -g snmp -p /var/run/snmpd.pid’

最后重启服务即可

/etc/init.d/hp-health start
/etc/init.d/hp-snmp-agents start

通过check_hpasm监控

http://labs.consol.de/lang/en/nagios/check_hpasm/

wget http://labs.consol.de/download/shinken-nagios-plugins/check_hpasm-4.6.3.2.tar.gz
tar xvzf check_hpasm-4.6.3.2.tar.gz 
cd check_hpasm-4.6.3.2
./configure –enable-perfdata –enable-extendedinfo –enable-hpacucli
make
make install

cd /usr/local/nagios/libexec
./check_hpasm –hostname 192.168.50.7

完成!

延伸阅读

评论