@@ -58,10 +58,11 @@
# 20121204 Added percentage of raid rebuild when raid verifying #
# 20121204 Changed raid percentage output when multiple members around #
# 20121228 ps type now also checks for failed power supply fans #
+# 20130728 Added copy to spare raid status by Peter Lieven #
#########################################################################
# Usage: ./check_equallogic -H host -C community -t type [-v volume] [-w warning] [-c critical]
#########################################################################
-help="check_equallogic (c) 2009-2012 Claudio Kuenzler (published under GPL licence)\n
+help="check_equallogic (c) 2009-2013 Claudio Kuenzler (published under GPL licence)\n
Usage: ./check_equallogic -H host -C community -t type [-v volume] [-w warning] [-c critical]\n
Options:\n-H Hostname\n-C SNMP-Community name (at least read-only)\n-t Type to check, see list below\n-v Name of volume to check\n-w Warning Threshold\n-c Critical Threshold\n
Requirements: snmpwalk, awk, grep, wc\n
@@ -280,7 +281,7 @@
raid)
raidstatus=$(snmpwalk -v 2c -O vqe -c ${community} ${host} 1.3.6.1.4.1.12740.2.1.13.1.1)
- s7=0; s6=0; s5=0; s4=0; s3=0; s2=0; s1=0
+ s8=0; s7=0; s6=0; s5=0; s4=0; s3=0; s2=0; s1=0
for s in $raidstatus
do
if [ "$s" = "1" ]; then s1=$((s1 + 1)); fi
@@ -290,6 +291,7 @@
if [ "$s" = "5" ]; then s5=$((s5 + 1)); fi
if [ "$s" = "6" ]; then s6=$((s6 + 1)); fi
if [ "$s" = "7" ]; then s7=$((s7 + 1)); fi
+ if [ "$s" = "8" ]; then s8=$((s8 + 1)); fi
done
declare -a raidpercentage=($(snmpwalk -v 2c -O vqe -c ${community} ${host} 1.3.6.1.4.1.12740.2.1.13.1.2))
@@ -302,6 +304,7 @@
if [ $s4 -gt 0 ]; then echo "RAID RECONSTRUCTING (${raidpercentage[@]}%)"; exit ${STATE_WARNING}; fi
if [ $s3 -gt 0 ]; then echo "RAID VERIFYING (${raidpercentage[@]}%)"; exit ${STATE_WARNING}; fi
if [ $s7 -gt 0 ]; then echo "RAID EXPANDING (${raidpercentage[@]}%)"; exit ${STATE_WARNING}; fi
+ if [ $s8 -gt 0 ]; then echo "RAID COPY TO SPARE (${raidpercentage[@]}%)"; exit ${STATE_WARNING}; fi
if [ $s1 -gt 0 ]; then echo "RAID OK"; exit ${STATE_OK}; fi
;;
|