zabbix agent 监控 HP Smart Array 状态信息实现

  办事器型号HPDL360Eg8,已装置HPArrayConfigurationUtility,现须要经过zabbix监控raid状况,非常 时收回警报. 那里便先容下经过hpacucli顺序联合zabbix完成Raid状况监测.

  

这里就介绍下通过hpacucli程序结合zabbix实现Raid状态监测.

1.修改windows系统环境变量(计算机->属性->高级系统设置->环境变量->系统变量中修改PATH),将hpacucli的bin路径加入PATH中;(默认:C:Program Files (x86)CompaqHpacucliBin)

2.修改zabbix_agentd.conf文件,利用UserParameter参数自定义agent key:

 

 如:

 

UserParameter=raid.pdstatus,hpacucli.exe ctrl slot=0 pd all show status| find /C "OK" UserParameter=raid.LDStatus,hpacucli.exe ctrl slot=0 logicaldrive all show status UserParameter=raid.ControllerModel,hpacucli.exe controller all show UserParameter=raid.LDNumber,hpacucli.exe ctrl slot=0 logicaldrive all show status | find "logicaldrive" /C UserParameter=raid.PD1Status,hpacucli.exe ctrl slot=0 physicaldrive 1i:1:1 show status | find  /C "OK" UserParameter=raid.PD2Status,hpacucli.exe ctrl slot=0 physicaldrive 1i:1:2 show status | find  /C "OK" UserParameter=raid.PD3Status,hpacucli.exe ctrl slot=0 physicaldrive 1i:1:3 show status | find  /C "OK"

 

UserParameter各个含义:

UserParameter=raid.pdstatus,hpacucli.exe ctrl slot=0 pd all show status| find /C "OK"     # 用来获取raid中(slot0 代表raid卡所在槽位1) 处于OK正常状态的物理磁盘数量

UserParameter=raid.LDStatus,hpacucli.exe ctrl slot=0logicaldrive all show status        

 # 用来获取raid中处于OK正常状态的逻辑磁盘数量

UserParameter=raid.ControllerModel,hpacucli.exe controller all show

 #用来获取所有raid卡的相关信息

UserParameter=raid.LDNumber,hpacucli.exe ctrl slot=0 logicaldrive all show

 #用来获取raid中所有逻辑磁盘的状态信息

UserParameter=raid.LDNumber,hpacucli.exe ctrl slot=0 logicaldrive all show status | find "logicaldrive"/C 

 #用来获取raid中所有逻辑磁盘的数量

UserParameter=raid.PD1Status,hpacucli.exe ctrl slot=0 physicaldrive 1i:1:1 show status | find  /C "OK"

UserParameter=raid.PD2Status,hpacucli.exe ctrl slot=0 physicaldrive 1i:1:2 show status | find  /C "OK"

UserParameter=raid.PD3Status,hpacucli.exe ctrl slot=0 physicaldrive 1i:1:3 show status | find  /C "OK"

 #用来获取raid中1、2、3号盘位硬盘的状态,为了绘图,使用find命令的/C参数进行技术,1

  为正常,否则为不正常

 

3.zabbix web控制台对主机创建item,key指向自己定义的key值即可.

4.agent服务重启(必须).

 

可以去zabbix web控制台查看监测数据了

posted @ 2016-04-19 08:40  1207270615  阅读(305)  评论(0)    收藏  举报