A simple role to deploy the checkmk agent with some custom local checks and agent plugins.
N/A
See: defaults/main.yml
Currently the following local checks are deployed default:
check_kernel_freshness
check_storagebox
The local megacli checks are not deployed automatically:
check_megacli_battery
check_megacli_diskgroups
check_megacli_firmware
check_megacli_num_disks
check_megacli_smart
To do so the following role variables need to be defined:
checkmkagent_megacli_num_disks
checkmkagent_megacli_num_disk_groups
checkmkagent_megacli_battery_adapter
Currently the following checkmk agent plugins are supported:
checkmkagent_plugins_available: [ 'mk_ceph', 'mk_logwatch.py', 'mk_mysql' ]
For general available agent plugins see the agent plugins folder of your checkmk monitoring server (i.e. https://monitoring.example.com/mysite/check_mk/agents/plugins/
).
N/A
- hosts: site
vars:
checkmkagent_host_url: 'http://monitor01.example.com/mysite'
roles:
- { role: jkirk.checkmkagent }
- hosts: ceph
roles:
- role: jkirk.checkmkagent
checkmkagent_host_url: 'http://monitor01.example.com/mysite'
checkmkagent_plugins: [ 'mk_ceph' ]
To migrate to systemd, checkmk 2.2+ needs to be installed.
To keep the xinetd integration for hosts which do not have checkmk 2.2+ and
still have xinetd installed and configured checkmkagent_service_xinetd: true
needs to be set.
Note, no xinetd configuration is deployed anymore, even if
checkmkagent_service_xinetd: True
is set.
mk_apt
was installed in /usr/lib/check_mk_agent/plugins/60
instead of /usr/lib/check_mk_agent/plugins/3600
.
To delete the check on all hosts from the wrong location you could use ansible like this:
% ansible -i hosts all -m shell -a "ls -l /usr/lib/check_mk_agent/plugins/60/mk_apt"
% ansible -i hosts all -b -m shell -a "rm /usr/lib/check_mk_agent/plugins/60/mk_apt"
% ansible -i hosts all -b -m shell -a "rmdir /usr/lib/check_mk_agent/plugins/60"
Older versions of this role used the variable checkmkagent_baseurl
instead checkmkagent_host_url
.
MIT
Darshaka Pathirana - https://synpro.solutions