aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/consul/resources/config/consul-agent-config/scripts/mr-kafka-health.sh
blob: 6630117e920ca7c854706c040006b75472a09cbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
kafkapod=$(/consul/bin/kubectl -n {{ include "common.namespace" . }} get pod | grep -o "message-router-global-kafka-[^[:space:]]*")
if [ -n "$kafkapod" ]; then
   if /consul/bin/kubectl -n {{ include "common.namespace" . }} exec -it $kafkapod -- ps ef | grep -i kafka; then
      echo Success. Kafka process is running. 2>&1
      exit 0
   else
      echo Failed. Kafka is not running. 2>&1
      exit 1
   fi
else
   echo Failed. Kafka container is offline. 2>&1
   exit 1
fi