Monitor does not detect a container as down but will correctly alert if it is stopped

CMK version: 2.4.0
OS version: Docker install in Debian Trixie LXC on Proxmox

Error message: none

I’ve set up a very simple test instance with 1 server and 1 container to monitor, installed the docker plugin and .cfg set up to use the container name as host name.

When I look at the server I see the docker env info from the plugin with the correct number of running containers. When I look at the container, that too shows as running and displays the stats I configured in docker.cfg.

If I “docker compose stop” my monitored container, the server shows 1 stopped and I get the red alert against the container host with “operational state: exited” so all works as I’d expect.

If I “docker compose down” the server correctly shows 1 less running (but 0 stopped) but the container status is still “running” so I get no alert - everything shows green even though the container is gone.

I would not expect it to work this way - the big green “OK” against container status is confusing and would appreciate feedback as to whether this is expected.

Thanks

I have tried to understand what the plugin is doing but unfortunately my Python skills are close to none.

I followed where it handles configuring the calls to use Name which is how I set the config up but when it queries status I see two places it either just says container not found or reads a status as “not running” and return(). What it doesn’t seem to do is set any flag to show not found which I assume is why I am still presented with disk/mem stats for a container which no longer exists.

I’m really confused as the way it stands now, the plugin is pretty unusable for the most basic function of a monitoring tool, which is availability. 99% of my system irl issues are up/down rather than metrics.

I will make an attempt at configuring an agent inside the container but that increases the mgt overhead significantly.