pvc-ansible/roles/pvc/templates/zookeeper/zk_status.j2

14 lines
330 B
Plaintext
Raw Normal View History

2023-09-01 15:42:26 -04:00
#!/bin/bash
# Zookeeper cluster status check for Check_MK
# {{ ansible_managed }}
echo "<<<zookeeper>>>"
2023-10-22 00:42:25 -04:00
zk_stat=$( /usr/share/zookeeper/bin/zkCli.sh -server $(hostname -s):2181 -q get /zookeeper 2>/dev/null )
2023-09-01 15:42:26 -04:00
zk_retcode=$?
if [[ ${zk_retcode} -eq 0 ]]; then
echo "Connection succeeded"
else
echo "Connection failed"
fi