Building on the work of https://gitlab.com/BobyMCbobs/container-images/-/tree/master/checkmk-agent.
docker build -t checkmk-agent:latest .
# backgrounding it
docker run -d --privileged -p 6556:6556 --hostname docker01 --name checkmk-agent checkmk-agent:latest
# debugging
docker run -it --rm --privileged -p 6556:6556 --hostname docker01 --name checkmk-agent checkmk-agent:latest bash
root@2967e06d8e2f:/ check_mk_agent | head
<<<check_mk>>>
Version: 2.1.0i1
AgentOS: linux
Hostname: 2967e06d8e2f
AgentDirectory: /etc/check_mk
DataDirectory: /var/lib/check_mk_agent
SpoolDirectory: /var/lib/check_mk_agent/spool
PluginsDirectory: /usr/lib/check_mk_agent/plugins
LocalDirectory: /usr/lib/check_mk_agent/local
AgentController:
root@2967e06d8e2f:/#
The original file is here: https://raw.githubusercontent.com/tribe29/checkmk/master/agents/cfg_examples/xinetd.conf
- Update the file in ./files/xinitd.d/check-mk-agent with your preferences
- Run docker build to include the updated file in your container
- Make a folder called
plugins
- Put the plugin scripts in the folder
- Use
-v ./plugins:/usr/lib/check_mk_agent/plugins:ro
in the run command
https://docs.checkmk.com/latest/en/agent_linux.html
- Configure the Agent with Docker
- Create a way to use the agent from the agent bakery