How do you monitor Docker in production

Monitor Docker

Run the agent directly in the container

In order to monitor details in the container itself (e.g. running processes, databases, log files, etc.), it is necessary that the Checkmk agent is executed in the container itself. This applies in particular to the roll-out of agent plug-ins. If you have not installed an agent in the container, the agent installed on the node is automatically executed in the container up to version 1.5.0 of Checkmk as soon as you monitor the node with Checkmk.

Since this procedure has not proven to be very efficient, from version 1.6.0 it is necessary that you install the normal Checkmk agent directly in the container in order to get more detailed monitoring in the container. The three plugins, and (Disk-I / O) also work here without an agent in the container and are calculated by the Checkmk agent on the node itself.

For Docker images that you have created yourself, you might want to roll out the agent in the container yourself. In this case, the data is no longer calculated by the agent of the Docker node, as described above. Instead, a separate agent runs in each container. The call is still bundled via the Docker node using the piggyback method.

However, the agent installed in the container only works if all the required commands are available in the container. Especially with minimally built containers based on Alpine Linux, it may well be that elementary things like bash are not available. In this case you should monitor the container from the Docker node.

In this case, the use of the Host Check Command rule set is only required if the container cannot be pinged, but otherwise works exactly as described above.