# Author: Lesovsky A.V. # Description: HP Smart Array monitoring via hpacucli (tested with P410, P222) # controller auto discovery UserParameter=hpraid.ctrl.discovery,/var/lib/zabbix/scripts/hp-raid-ctrl-discovery.sh # logical drives (RAID volumes) auto discovery UserParameter=hpraid.ld.discovery,/usr/var/zabbix/scripts/hp-raid-ld-discovery.sh # physical drives auto discovery UserParameter=hpraid.pd.discovery,/usr/var/zabbix/scripts/hp-raid-pd-discovery.sh ### ==================== # Adapters status section. # $1 - slot number with installed adapter. Int from 1 to X (auto-discovery variable {#CTRL_SLOT}). UserParameter=hpraid.ctrl.status[*],sed -n -e "/ctrl begin $1/,/ctrl end $1/p" /tmp/hp-raid-data-harvester.out |grep -wE "[ ]+Controller Status:" |awk '{print $$3}' UserParameter=hpraid.cache.status[*],sed -n -e "/ctrl begin $1/,/ctrl end $1/p" /tmp/hp-raid-data-harvester.out |grep -w "Controller Status:" |awk '{print $$3}' UserParameter=hpraid.bbu.status[*],sed -n -e "/ctrl begin $1/,/ctrl end $1/p" /tmp/hp-raid-data-harvester.out |grep -w "Controller Status:" |awk '{print $$3}' # Logical volume status section. # $1 - slot number with installed adapter. Int from 1 to X # $2 - logical volume number. Int from 1 to X UserParameter=hpraid.ld.status[*],sed -n -e "/ld begin $1 $2/,/ld end $1 $2/p" /tmp/hp-raid-data-harvester.out |grep -wE "[ ]+Status:" |awk '{print $$2}' # Physical drive status section # $1 - slot number with installed adapter. Int from 1 to X # $2 - physical drive number. Int from 1 to X UserParameter=hpraid.pd.status[*],sed -n -e "/pd begin $1 $2/,/pd end $1 $2/p" /tmp/hp-raid-data-harvester.out |grep -wE '[ ]+Status:' |awk '{print $$2}' UserParameter=hpraid.pd.temperature[*],sed -n -e "/pd begin $1 $2/,/pd end $1 $2/p" /tmp/hp-raid-data-harvester.out |grep -wE '[ ]+Current Temperature \(C\):' |awk '{print $$4}'