Checkmk Ultimate allows to push data from agent to the checkmk server. If you are using Community or Pro Edition you may miss this feature. In the past i used a mix of PHP- and shell-scripts to push data from agents behind firewalls. It worked. But it wasn’t exactly pretty. Some members of this forum uses ssh or webdav to submit agent output to the checkmk-server, but that doesn’t meet my requirements.
So i started to work on agent-push-server and agent-push-client.
The Agent-Push-Server is a REST API implemented using FastAPI that, following authentication, receives and stores results in plain-text format for a specific hostname. The API accepts data for the hostname used for authentication or for hostnames for which transmission authorization exists. Configuration is straightforward, using a plain-text TOML file. The agent push server can be run in a Docker container (e.g., if Checkmk is also running in a container) or as a systemd service. The received data is stored in a Docker volume or a directory to which Checkmk requires read access. Afterwards you should need to configure checkmk as documented: checkmk reads content from saved files and detects up/down using the fileage. Agent push does not support TLS for the agent directly but should be used via HTTPS only.
As a client you can use a simple bash script (see contrib/scripts/agent-push-client.sh) or agent-push-client.
Agent-Push-Client is a python based application to submit the result(s) of check_mk_agent to Agent-Push-Server. The client can collect data from a local installed check_mk_agent or using remote tcp connection to port 6556 inside your network. This client can collect multiple remote check_mk_agents using different check intervals. Currently every collect process is a thread. agent-push-client can be used in a docker container (only use remote collection) and as a service using systemd (e.g. Debian) or OpenRC (Gentoo). Configuration is also done via plaintext toml file.
Do you have any problems or suggestions? Feel free to open an issue on Github or in this forum.
Disclaimer: Parts of this project were generated or assisted using Claude Code.