Skip to content

Commit

Permalink
Merge branch 'bjozet', customink#9
Browse files Browse the repository at this point in the history
  • Loading branch information
helmo committed Jul 31, 2017
2 parents 2786725 + 1c379a8 commit 119baa6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions check_glusterfs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ for entries in $(sudo gluster volume heal ${VOLUME} info | awk '/^Number of entr
done
if [ "$heal" -gt 0 ]; then
errors=("${errors[@]}" "$heal unsynched entries")
ex_stat="WARNING_stat"
fi

# get volume status
Expand Down Expand Up @@ -158,7 +159,7 @@ if [ -n "$CRIT" -a -n "$WARN" ]; then
Exit UNKNOWN "critical threshold below warning"
elif [ $freegb -lt $CRIT ]; then
errors=("${errors[@]}" "free space ${freegb}GB")
ex_stat="CRITICAL_stat"
ex_stat="CRITICAL_stat"
elif [ $freegb -lt $WARN ]; then
errors=("${errors[@]}" "free space ${freegb}GB")
ex_stat="WARNING_stat"
Expand All @@ -170,7 +171,7 @@ if [ -n "$errors" ]; then
sep='; '
msg=$(printf "${sep}%s" "${errors[@]}")
msg=${msg:${#sep}}
if [ ${ex_stat} == "CRITICAL_stat" ]; then
if [ "${ex_stat}" == "CRITICAL_stat" ]; then
Exit CRITICAL "${msg}"
else
Exit WARNING "${msg}"
Expand Down

0 comments on commit 119baa6

Please sign in to comment.