14 lines
330 B
Django/Jinja
Executable File
14 lines
330 B
Django/Jinja
Executable File
#!/bin/bash
|
|
|
|
# Zookeeper cluster status check for Check_MK
|
|
# {{ ansible_managed }}
|
|
|
|
echo "<<<zookeeper>>>"
|
|
zk_stat=$( /usr/share/zookeeper/bin/zkCli.sh -server $(hostname -s):2181 -q get /zookeeper 2>/dev/null )
|
|
zk_retcode=$?
|
|
if [[ ${zk_retcode} -eq 0 ]]; then
|
|
echo "Connection succeeded"
|
|
else
|
|
echo "Connection failed"
|
|
fi
|