summaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rwxr-xr-xservice/check_kaas.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/service/check_kaas.sh b/service/check_kaas.sh
index b43acc0..792cf55 100755
--- a/service/check_kaas.sh
+++ b/service/check_kaas.sh
@@ -25,14 +25,20 @@ if [ -z "$etcd" -o "$etcd" -lt 3 ]; then
fi
if [ $healthy -ne 0 ]; then
- nodes=$(oc get nodes | grep Ready | wc -l)
- if [ $nodes -ge $e_nodes ]; then
- nodes=" / \${color gray}$etcd etcd, $nodes nodes"
+ nodes=$(oc get nodes)
+ ready=$(echo "$nodes" | grep Ready | wc -l)
+ active=$(echo "$nodes" | grep Ready | grep -vi SchedulingDisabled | wc -l)
+ if [ $ready -ge $e_nodes ]; then
+ nodes=" / \${color gray}$etcd etcd, $ready nodes"
+ if [ $active -ne $ready ]; then
+ nodes="$nodes ($active active)"
+ fi
else
- offline=$(oc get nodes | grep -v "STATUS" | grep -v "Ready" | wc -l)
- nodes=" / \${color gray}$etcd etcd, $nodes ready, $offline offline"
+ echo "$nodes" | grep -v "STATUS" | grep -v "Ready" | awk '{ print $1, $2 }' | sed 's/^/* /'
+
+ offline=$(echo "$nodes" | grep -v "STATUS" | grep -v "Ready" | wc -l)
+ nodes=" / \${color gray}$etcd etcd, $ready ready, $offline offline"
healthy=2
- oc get nodes | grep -v "STATUS" | grep -v "Ready" | awk '{ print $1, $2 }' | sed 's/^/* /'
fi
fi