高小强的汽车暴晒场 2018-02-12
Nagios Check_hp HP
2014年11月18日
下午 08:49
https://IP:2381
[root@nagios ~]# tar zxvf check_hp_bladechassis-1.0.1.tar.gz
[root@nagios check_hp_bladechassis-1.0.1]# ./check_hp_bladechassis -H xxx.xxx.xxx.xxx
SNMP ERROR: Can't determine model name
[root@nagios check_hp_bladechassis-1.0.1]# snmpwalk -Os -c public -v 1 xxx.xxx.xxx
[root@nagios libexec]# ./check_hpasm -H xxx.xxx.xxx -C public
CRITICAL - snmpwalk returns no product name (cpqsinfo-mib), wrong device
在windows端安装ilo驱动 (必须),先安装SNMP再Agent(cp024529_log_th.exe cp024617_ilo_th.exe cp022559_hp_agents_w2008.exe)
[root@nagios libexec]# ./check_hpasm -H xxx.xxx.xxx
OK - System: 'proliant dl380p gen8', S/N: '*******', ROM: 'P70 03/01/2013', hardware working fine, da: 2 logical drives, 16 physical drives
Redhat系统下安装agent
[root@localhost ~]# rpm -ivh hpacucli-9.40-12.0.x86_64.rpm(不必须)
rpm -ivh hp-health-9.50-1631.33.rhel5.x86_64.rpm(必须)
rpm -ivh hp-snmp-agents-9.50-2564.34.rhel5.x86_64.rpm(必须)
/etc/init.d/hp-snmp-agents start
需要配置snmp
/sbin/hpsnmpconfig
/etc/init.d/hp-health restart
/etc/init.d/hp-asrd restart
/etc/init.d/hp-snmp-agents restart
其他Server访问不了
[root@nagios libexec]# ./check_hpasm -H xxx.xxx.xxx
CRITICAL - snmpwalk returns no product name (cpqsinfo-mib), wrong device
但本地能检查出数据,所以是snmp配置有误。
[root@localhost plugins-scripts]# ./check_hpasm
OK - System: 'proliant dl380p gen8', S/N: '*******', ROM: 'P70 03/01/2013', hardware working fine
Linux下配置snmp(可从其他机台copy过来)
[root@localhost plugins-scripts]# vim /etc/snmp/snmpd.conf
#add (网上参考) <http://javatechnology.iteye.com/blog/768001>
# sec.name source community
com2sec notConfigUser [監控主機] public
.1表示所有设备信息
viewsystemviewincluded.1
修改process checks(去掉注释)
# proc mountd
# proc ntalkd 4
# proc sendmail 10 1
修改Executables/scripts配置(去掉注释)
#exec echotest /bin/echo hello world
修改disk checks配置(去掉注释)
#disk / 10000
修改load average checks配置(去掉注释)
#load 12 14 14
[root@localhost plugins-scripts]# service snmpd restart
其他Server获取信息ok
[root@nagios libexec]# ./check_hpasm -H xxx.xxx.xxx
OK - System: 'proliant dl380p gen8', S/N: '*******', ROM: 'P70 03/01/2013', hardware working fine, da: 1 logical drives, 14 physical drives
注意:proliant dl380 gen9
rpm -ivh hp-health-10.10-1710.30.rhel6.x86_64.rpm
rpm -ihv hp-snmp-agents-10.10-2732.25.rhel6.x86_64.rpm
cp029394_ilo_Interface.exe
cp029429_ilo_Management.exe
cp030048_Agent.exe
http://www.hpiss.com/7740.html