Commit c9c4f77b authored by Fulvio Galeazzi's avatar Fulvio Galeazzi
Browse files

2018-04-04: FG; Removed ceph_health.sh script.

parent 2bd075d7
#!/bin/sh
#
# Copyright 2015 Mirantis, Inc.
#
# 2016-04-26: Fulvio Galeazzi (Consortium GARR)
# Modified so that clock skew triggers '1' and any other message
# (like during rebalancing) triggers '2'
#
healthMsg=`sudo ceph health`
echo $healthMsg | grep -q HEALTH_OK
if [ $? -eq 0 ]; then
echo 0
else
textMsg=`echo $healthMsg | awk -F\; '{text="";split($0,a,";"); for(i=1; i<=NF; i++) {if (a[i] ~ /clock skew/) {continue;} else { text=text" "a[i]}}; print text}'`
# echo "TextMsg = -->"$textMsg"<--"
if [[ -z $textMsg || $textMsg = [[:space:]] ]]; then
echo 1
else
echo 2
fi
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment