install_check_mk_agent
install-check_mk-agent
This role is deprecated in favor of checkmk_agent which is a rebuild using better practices and naming conventions. No further updates will be made to this repository/role.
An Ansible Role to install the agent/client for Check_MK RAW.
All tasks are tagged with install-check-mk-agent
.
This role utilizes SSH on Unix-type systems instead of the default port 6556. This encrypts communications and avoids opening a new port for monitoring and setting up a new service.
Tested manually with the Ansible Role Test Shim Script from Jeff Geerling on the following distributions:
- CentOS-7
- CentOS-8
- Debian 9 "Stretch"
- Debian 10 "Buster"
- Ubuntu 18.04 LTS "Bionic Beaver"
- Ubuntu 20.04 LTS "Focal Fossa"
The following operating systems are also supported and tested manually:
Requirements
Requirements on host that executes role:
- groupadd
- groupdel
- groupmod
Requirements on host that executes role with APT:
- python-apt (python 2)
- python3-apt (python 3)
- aptitude (before 2.4)
Requirements on host that executes role with YUM:
- yum
If the server is Windows and has a firewall enabled, it may need to be altered to allow incoming packets on TCP port 6556.
Role Variables
Defaults
Variable | Description | Value |
---|---|---|
install_check_mk_agent_prereqs | List of packages to install before configuring agent | sudo |
install_check_mk_agent_user | Name of user to configure | cmkagent |
install_check_mk_agent_home | Home folder of configured user | "/home/{{ install_check_mk_agent_user }}" |
install_check_mk_agent_count_users_warn | Logged in users, warning threshold | 10 |
install_check_mk_agent_count_users_crit | Logged in users, critical threshold | 15 |
install_check_mk_agent_count_zombie_procs_warn | Zombie processes, warning threshold | 5 |
install_check_mk_agent_count_zombie_procs_crit | Zombie processes, critical threshold | 10 |
install_check_mk_agent_freebsd_plugins | List of active FreeBSD plugins | [] |
install_check_mk_agent_local_checks | List of active local checks | count_users , count_zombie_procs |
install_check_mk_agent_plugins | List of active Linux plugins | See NOTE A |
install_check_mk_agent_win_tmp | Temporary location of Windows installation file | "c:\{{ install_check_mk_agent_win_filename }}" |
install_check_mk_agent_win_filename | Filename of Windows installation file | check_mk_agent.msi |
install_check_mk_agent_win_config | Filename of Windows configuration template | check_mk.example.ini.j2 |
install_check_mk_agent_win_folder | Folder the agent gets installed to | C:\Program Files (x86)\check_mk\ |
install_check_mk_agent_win_plugins | List of active Windows plugins | mk_inventory.vbs |
NOTE A
install_check_mk_agent_plugins:
- lvm
- mk_inventory.linux
- mk_iptables
- mk_nfsiostat
- mk_sshd_config
- netstat.linux
- nfsexports
- smart
Dependencies
This role depends on none other.
Example Playbook
Complete example:
- hosts: all
roles:
- { role: install-check_mk-agent, install_check_mk_agent_user: agent }
License
GNU General Public License version 2
Author Information
Chris Lindbergh @kso512
A role to install Check_MK RAW agent.
ansible-galaxy install kso512/install-check_mk-agent