File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ for entries in $(sudo gluster volume heal ${VOLUME} info | awk '/^Number of entr
103103done
104104if [ " $heal " -gt 0 ]; then
105105 errors=(" ${errors[@]} " " $heal unsynched entries" )
106+ ex_stat=" WARNING_stat"
106107fi
107108
108109# get volume status
@@ -158,7 +159,7 @@ if [ -n "$CRIT" -a -n "$WARN" ]; then
158159 Exit UNKNOWN " critical threshold below warning"
159160 elif [ $freegb -lt $CRIT ]; then
160161 errors=(" ${errors[@]} " " free space ${freegb} GB" )
161- ex_stat=" CRITICAL_stat"
162+ ex_stat=" CRITICAL_stat"
162163 elif [ $freegb -lt $WARN ]; then
163164 errors=(" ${errors[@]} " " free space ${freegb} GB" )
164165 ex_stat=" WARNING_stat"
@@ -170,7 +171,7 @@ if [ -n "$errors" ]; then
170171 sep=' ; '
171172 msg=$( printf " ${sep} %s" " ${errors[@]} " )
172173 msg=${msg: ${# sep} }
173- if [ ${ex_stat} == " CRITICAL_stat" ]; then
174+ if [ " ${ex_stat} " == " CRITICAL_stat" ]; then
174175 Exit CRITICAL " ${msg} "
175176 else
176177 Exit WARNING " ${msg} "
You can’t perform that action at this time.
0 commit comments