@@ -67,6 +67,7 @@
# 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 #
+# 20151126 Bugfix in memberusage and poolusage checks (missing newline) #
################################################################################
# Usage: ./check_equallogic -H host -C community -t type [-v volume] [-w warning] [-c critical]
################################################################################
@@ -663,29 +664,28 @@
let poolinuse=poolinuse/1024
let poolused[$c2]=poolused[$c2]/1024
- result="Pool ${poolname[c2]} Size ${pooltotal[$c2]}GB, Total In Use ${poolinuse}GB (${usedpercent}%) = (Used ${poolused[$c2]}GB + Delegated ${pooldelegated[$c2]}GB + Replication ${poolreplication[$c2]}GB), Free ${freestorage}GB //"
+ result="Pool ${poolname[c2]} Size ${pooltotal[$c2]}GB, Total In Use ${poolinuse}GB (${usedpercent}%) = (Used ${poolused[$c2]}GB + Delegated ${pooldelegated[$c2]}GB + Replication ${poolreplication[$c2]}GB), Free ${freestorage}GB"
if [ -n "${warning}" ] || [ -n "${critical}" ]
then
if [ ${usedpercent} -ge ${warning} ] && [ ${usedpercent} -lt ${critical} ]
then
- echo -n "WARNING: ${result}"
+ echo "WARNING: ${result}"
if [ ${exitstate} -ne 2 ]
then
exitstate=${STATE_WARNING}
fi
elif [ ${usedpercent} -ge ${critical} ]
then
- echo -n "CRITICAL: ${result}"
+ echo "CRITICAL: ${result}"
exitstate=${STATE_CRITICAL}
else
- echo -n "OK: ${result}"
+ echo "OK: ${result}"
fi
else
- echo -n "OK: "${result}
+ echo "OK: "${result}
fi
- echo -n " "
let c2=c2+1
done
@@ -724,20 +724,20 @@
then
if [ ${usedpercent} -ge ${warning} ] && [ ${usedpercent} -lt ${critical} ]
then
- echo -n "WARNING: Pool $c2 Total ${pooltotal[$c2]}GB, Used ${poolused[$c2]}GB (${usedpercent}%)|'space used'=${poolused_perfdata}, 'total space'=${pooltotal_perfdata}"
+ echo "WARNING: Pool $c2 Total ${pooltotal[$c2]}GB, Used ${poolused[$c2]}GB (${usedpercent}%)|'space used'=${poolused_perfdata}, 'total space'=${pooltotal_perfdata}"
if [ $bad -ne 2 ]
then
bad=1
fi
elif [ ${usedpercent} -ge ${critical} ]
then
- echo -n "CRITICAL: Pool $c2 Total ${pooltotal[$c2]}GB, Used ${poolused[$c2]}GB (${usedpercent}%)|'space used'=${poolused_perfdata}, 'total space'=${pooltotal_perfdata}"
+ echo "CRITICAL: Pool $c2 Total ${pooltotal[$c2]}GB, Used ${poolused[$c2]}GB (${usedpercent}%)|'space used'=${poolused_perfdata}, 'total space'=${pooltotal_perfdata}"
bad=2
else
- echo -n "OK: Pool $c2 Total ${pooltotal[$c2]}GB, Used ${poolused[$c2]}GB (${usedpercent}%)|'space used'=${poolused_perfdata}, 'total space'=${pooltotal_perfdata}"
+ echo "OK: Pool $c2 Total ${pooltotal[$c2]}GB, Used ${poolused[$c2]}GB (${usedpercent}%)|'space used'=${poolused_perfdata}, 'total space'=${pooltotal_perfdata}"
fi
else
- echo -n "OK: Pool $c2 Total ${pooltotal[$c2]}GB, Used ${poolused[$c2]}GB (${usedpercent}%)|'space used'=${poolused_perfdata}, 'total space'=${pooltotal_perfdata}"
+ echo "OK: Pool $c2 Total ${pooltotal[$c2]}GB, Used ${poolused[$c2]}GB (${usedpercent}%)|'space used'=${poolused_perfdata}, 'total space'=${pooltotal_perfdata}"
fi
let c2=c2+1
|