Add additional CMK checks

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:26 -04:00
parent 88491befab
commit f25a80ff53
3 changed files with 25 additions and 0 deletions

View File

@ -45,6 +45,12 @@
no_log: True
when: pvc_api_enable_ssl and not pvc_api_ssl_key_path
- name: install check_mk agent check
template:
src: pvc/pvc_status.j2
dest: /usr/lib/check_mk_agent/plugins/pvc_status
mode: 0755
- include: pvc/bootstrap.yml
run_once: yes
when: bootstrap is defined and bootstrap and is_coordinator

View File

@ -24,6 +24,12 @@
dest: /etc/cron.daily/zookeeper-vacuum
mode: 0755
- name: install check_mk agent check
template:
src: zookeeper/zk_status.j2
dest: /usr/lib/check_mk_agent/plugins/zk_status
mode: 0755
- name: install systemd unit file
template:
src: zookeeper/zookeeper.service.j2

View File

@ -0,0 +1,13 @@
#!/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 /primary_node 2>/dev/null )
zk_retcode=$?
if [[ ${zk_retcode} -eq 0 ]]; then
echo "Connection succeeded"
else
echo "Connection failed"
fi