Add additional CMK checks
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
							
								
								
									
										13
									
								
								roles/pvc/templates/zookeeper/zk_status.j2
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								roles/pvc/templates/zookeeper/zk_status.j2
									
									
									
									
									
										Executable 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 | ||||
		Reference in New Issue
	
	Block a user