snapshot
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
---
|
||||
checkmk_linux_local_dir: "/usr/lib/check_mk_agent/local"
|
||||
checkmk_linux_config_dir: "/etc/check_mk"
|
||||
checkmk_windows_local_dir: "C:\\ProgramData\\checkmk\\agent\\local"
|
||||
checkmk_linux_scripts_dir: "Linux/local"
|
||||
checkmk_windows_scripts_dir: "Windows/local"
|
||||
|
||||
# Optional checks, disabled until explicitly requested
|
||||
want_linux_check_certificate: false
|
||||
want_windows_citrix: false
|
||||
want_windows_surebackup: false
|
||||
want_windows_backup: false
|
||||
@@ -0,0 +1,16 @@
|
||||
Place the actual monitoring scripts in these directories.
|
||||
|
||||
Linux/local/
|
||||
- check_certificate_directory.sh
|
||||
- check_unifi-controller.sh
|
||||
- unifi.cfg
|
||||
|
||||
Windows/local/
|
||||
- check-ping.ps1
|
||||
- citrix_sessions_customized.ps1
|
||||
- veeam_config_backup_status.ps1
|
||||
- veeam_o365_status.ps1
|
||||
- veeam_surebackup_status.ps1
|
||||
- windows-backup.ps1
|
||||
|
||||
The ZIP intentionally does not invent script contents that were not provided.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
galaxy_info:
|
||||
role_name: checkmk_scripts
|
||||
description: Deploy role-specific Checkmk local monitoring scripts
|
||||
min_ansible_version: "2.18"
|
||||
dependencies: []
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
- name: "Linux | Ensure local dir exists"
|
||||
ansible.builtin.file:
|
||||
path: "{{ checkmk_linux_local_dir }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: "Linux | Ensure config dir exists"
|
||||
ansible.builtin.file:
|
||||
path: "{{ checkmk_linux_config_dir }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
|
||||
- name: "Linux | Deploy UniFi local check"
|
||||
when: is_unifi_controller | default(false) | bool
|
||||
ansible.builtin.copy:
|
||||
src: "{{ checkmk_linux_scripts_dir }}/check_unifi-controller.sh"
|
||||
dest: "{{ checkmk_linux_local_dir }}/check_unifi-controller.sh"
|
||||
mode: "0755"
|
||||
notify: "checkmk | linux | agent-ensure-running"
|
||||
|
||||
- name: "Linux | Deploy unifi.cfg"
|
||||
when: is_unifi_controller | default(false) | bool
|
||||
ansible.builtin.copy:
|
||||
src: "{{ checkmk_linux_scripts_dir }}/unifi.cfg"
|
||||
dest: "{{ checkmk_linux_config_dir }}/unifi.cfg"
|
||||
mode: "0644"
|
||||
notify: "checkmk | linux | agent-ensure-running"
|
||||
|
||||
- name: "Linux | Deploy certificate directory check"
|
||||
when: want_linux_check_certificate | default(false) | bool
|
||||
ansible.builtin.copy:
|
||||
src: "{{ checkmk_linux_scripts_dir }}/check_certificate_directory.sh"
|
||||
dest: "{{ checkmk_linux_local_dir }}/check_certificate_directory.sh"
|
||||
mode: "0755"
|
||||
notify: "checkmk | linux | agent-ensure-running"
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
- name: Include Linux monitoring scripts
|
||||
ansible.builtin.include_tasks: linux.yml
|
||||
when: ansible_facts['os_family'] != 'Windows'
|
||||
|
||||
- name: Include Windows monitoring scripts
|
||||
ansible.builtin.include_tasks: windows.yml
|
||||
when: ansible_facts['os_family'] == 'Windows'
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
- name: "Windows | Ensure local dir exists"
|
||||
ansible.windows.win_file:
|
||||
path: "{{ checkmk_windows_local_dir }}"
|
||||
state: directory
|
||||
|
||||
- name: "Windows | Deploy check-ping.ps1 (DC only)"
|
||||
when: is_dc | default(false) | bool
|
||||
ansible.windows.win_copy:
|
||||
src: "{{ checkmk_windows_scripts_dir }}/check-ping.ps1"
|
||||
dest: "{{ checkmk_windows_local_dir }}\\check-ping.ps1"
|
||||
notify: "checkmk | windows | agent-ensure-running"
|
||||
|
||||
- name: "Windows | Deploy Veeam configuration backup status check (VBR only)"
|
||||
when: has_veeam_vbr | default(false) | bool
|
||||
ansible.windows.win_copy:
|
||||
src: "{{ checkmk_windows_scripts_dir }}/veeam_config_backup_status.ps1"
|
||||
dest: "{{ checkmk_windows_local_dir }}\\veeam_config_backup_status.ps1"
|
||||
notify: "checkmk | windows | agent-ensure-running"
|
||||
|
||||
- name: "Windows | Deploy veeam_o365_status.ps1 (VBO only)"
|
||||
when: has_veeam_vbo | default(false) | bool
|
||||
ansible.windows.win_copy:
|
||||
src: "{{ checkmk_windows_scripts_dir }}/veeam_o365_status.ps1"
|
||||
dest: "{{ checkmk_windows_local_dir }}\\veeam_o365_status.ps1"
|
||||
notify: "checkmk | windows | agent-ensure-running"
|
||||
|
||||
- name: "Windows | Deploy Citrix sessions check"
|
||||
when: want_windows_citrix | default(false) | bool
|
||||
ansible.windows.win_copy:
|
||||
src: "{{ checkmk_windows_scripts_dir }}/citrix_sessions_customized.ps1"
|
||||
dest: "{{ checkmk_windows_local_dir }}\\citrix_sessions_customized.ps1"
|
||||
notify: "checkmk | windows | agent-ensure-running"
|
||||
|
||||
- name: "Windows | Deploy Veeam SureBackup check"
|
||||
when: want_windows_surebackup | default(false) | bool
|
||||
ansible.windows.win_copy:
|
||||
src: "{{ checkmk_windows_scripts_dir }}/veeam_surebackup_status.ps1"
|
||||
dest: "{{ checkmk_windows_local_dir }}\\veeam_surebackup_status.ps1"
|
||||
notify: "checkmk | windows | agent-ensure-running"
|
||||
|
||||
- name: "Windows | Deploy Windows Backup check"
|
||||
when: want_windows_backup | default(false) | bool
|
||||
ansible.windows.win_copy:
|
||||
src: "{{ checkmk_windows_scripts_dir }}/windows-backup.ps1"
|
||||
dest: "{{ checkmk_windows_local_dir }}\\windows-backup.ps1"
|
||||
notify: "checkmk | windows | agent-ensure-running"
|
||||
Reference in New Issue
Block a user