summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-01-10 06:35:46 +0100
committerSuren A. Chilingaryan <csa@suren.me>2019-01-10 06:35:46 +0100
commit4bc60db4b1db1c71ea17141ca7dfbcc5faf32227 (patch)
tree2eaf861202f1511df4ab5472dbae348a6ea0f9e1
parent4de0f896eed66d1bc63e82dd0c23ea338fbf310a (diff)
downloadconky-4bc60db4b1db1c71ea17141ca7dfbcc5faf32227.tar.gz
conky-4bc60db4b1db1c71ea17141ca7dfbcc5faf32227.tar.bz2
conky-4bc60db4b1db1c71ea17141ca7dfbcc5faf32227.tar.xz
conky-4bc60db4b1db1c71ea17141ca7dfbcc5faf32227.zip
Don't complain on just normally errornous pods
-rwxr-xr-xservice/check_kaas.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/service/check_kaas.sh b/service/check_kaas.sh
index e69e73d..b43acc0 100755
--- a/service/check_kaas.sh
+++ b/service/check_kaas.sh
@@ -36,13 +36,13 @@ if [ $healthy -ne 0 ]; then
fi
fi
-# Find pods in wrong states
+# Find pods in unexpected states
if [ $healthy -ne 0 ]; then
- pods=$(oc get pods --all-namespaces | awk '$6~/s|m/ { next } { print }' | grep -P "Terminating|Pending|CrashLoopBackOff" | wc -l)
+ pods=$(oc get pods --all-namespaces | awk '$6~/s|m/ { next } { print }' | grep -P "Terminating|Pending" | wc -l)
if [ $pods -ge $e_pods ]; then
healthy=2
echo "Pods stalled in wrong states:"
- oc get pods --all-namespaces -o wide | awk '$6~/s|m/ { next } { print }' | grep -P "(Terminating|Pending|CrashLoopBackOff)" | head -n $p_pods | sed -e 's/[[:space:]]\+/ /g'
+ oc get pods --all-namespaces -o wide | awk '$6~/s|m/ { next } { print }' | grep -P "(Terminating|Pending)" | head -n $p_pods | sed -e 's/[[:space:]]\+/ /g'
fi
fi
@@ -56,4 +56,14 @@ if [ $healthy -ne 0 ]; then
fi
fi
+# Find own pods in error states
+if [ $healthy -ne 0 ]; then
+ pods=$(oc get pods --all-namespaces | grep -P "adei|adai|bora" | awk '$6~/s|m/ { next } { print }' | grep -P "CrashLoopBackOff|Error" | wc -l)
+ if [ $pods -ge $e_pods ]; then
+ healthy=2
+ echo "Pods with errors:"
+ oc get pods --all-namespaces -o wide | grep -P "adei|adai|bora" | awk '$6~/s|m/ { next } { print }' | grep -P "(CrashLoopBackOff|Error)" | head -n $p_pods | sed -e 's/[[:space:]]\+/ /g'
+ fi
+fi
+
echo "$online $healthy $version $nodes"