Add additional CMK checks
This commit is contained in:
parent
9b103f48ad
commit
2e9d02ab52
|
@ -45,6 +45,12 @@
|
||||||
no_log: True
|
no_log: True
|
||||||
when: pvc_api_enable_ssl and not pvc_api_ssl_key_path
|
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
|
- include: pvc/bootstrap.yml
|
||||||
run_once: yes
|
run_once: yes
|
||||||
when: bootstrap is defined and bootstrap and is_coordinator
|
when: bootstrap is defined and bootstrap and is_coordinator
|
||||||
|
|
|
@ -24,6 +24,12 @@
|
||||||
dest: /etc/cron.daily/zookeeper-vacuum
|
dest: /etc/cron.daily/zookeeper-vacuum
|
||||||
mode: 0755
|
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
|
- name: install systemd unit file
|
||||||
template:
|
template:
|
||||||
src: zookeeper/zookeeper.service.j2
|
src: zookeeper/zookeeper.service.j2
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue