Changes of Revision 14
[-] | Changed | check_equallogic.changes |
x 1
2 ------------------------------------------------------------------- 3 +Mon Oct 12 12:21:40 UTC 2015 - cs@linux-administrator.com 4 + 5 +- update to release 20151006 6 + * Bugfix in vol check if volume not found 7 + 8 +------------------------------------------------------------------- 9 Tue Feb 3 20:40:15 UTC 2015 - cs@linux-administrator.com 10 11 - update to release 20150203 12 |
||
[-] | Changed | check_equallogic.spec ^ |
8 1
2 Name: check_equallogic 3 -Version: 20150203 4 +Version: 20151006 5 Release: 1 6 Url: http://www.claudiokuenzler.com/nagios-plugins/check_equallogic.php 7 Group: Applications/System 8 |
||
[+] | Changed | check_equallogic ^ |
@@ -66,6 +66,7 @@ # 20140626 Bugfix in etherrors check # # 20140711 Added snmp connection check function # # 20150203 Bugfix in vol check in percentage calculation # +# 20151006 Bugfix in vol check if volume not found by Stephane Loeuillet # ################################################################################ # Usage: ./check_equallogic -H host -C community -t type [-v volume] [-w warning] [-c critical] ################################################################################ @@ -842,6 +843,7 @@ echo "CRITICAL - No volume name given."; exit 2 fi volarray=$(snmpwalk -v 2c -c ${community} ${host} 1.3.6.1.4.1.12740.5.1.7.1.1.4 | grep -n "\"${volume}\"" | sed -n '1p' | cut -d : -f1) +if [ -z "${volarray}" ]; then echo "UNKNOWN - Volume ${volume} does not exist"; exit 3; fi volavailspace=$(snmpwalk -v 2c -O vqe -c ${community} ${host} 1.3.6.1.4.1.12740.5.1.7.1.1.8 | awk "NR==${volarray}") humanavailspace=$((${volavailspace} / 1024)) perfavailspace=$((${volavailspace}*1024*1024)) |