Skip to content

Commit 119baa6

Browse files
committed
Merge branch 'bjozet', customink#9
2 parents 2786725 + 1c379a8 commit 119baa6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

check_glusterfs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ for entries in $(sudo gluster volume heal ${VOLUME} info | awk '/^Number of entr
103103
done
104104
if [ "$heal" -gt 0 ]; then
105105
errors=("${errors[@]}" "$heal unsynched entries")
106+
ex_stat="WARNING_stat"
106107
fi
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}"

0 commit comments

Comments
 (0)