summaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-08-25 03:31:11 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-08-25 03:31:11 +0200
commit5e6c83d51d0f52ecb464f137ad68f0bd1a83f5e4 (patch)
tree8189756e2a1caee1826d691e7b583305f7b6b81c /service
parent35fde3c5b004788e7bf837c2f4aba531f6076759 (diff)
downloadconky-5e6c83d51d0f52ecb464f137ad68f0bd1a83f5e4.tar.gz
conky-5e6c83d51d0f52ecb464f137ad68f0bd1a83f5e4.tar.bz2
conky-5e6c83d51d0f52ecb464f137ad68f0bd1a83f5e4.tar.xz
conky-5e6c83d51d0f52ecb464f137ad68f0bd1a83f5e4.zip
Check also if all KaaS nodes have scheduling enabled
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