Markus Michalski FAQ

Watchdog: Docker Container Health

Checks via the Docker API whether a container is running and healthy, using the container's own HEALTHCHECK. Type docker, runner Dashboard or Agent. Statuses and messages.

Deutsche Version

Back to check types

Watchdog: Docker Container Health

The check queries the state of a container through the Docker socket /var/run/docker.sock. It evaluates Running and, if the container defines a HEALTHCHECK, its status.

Property Value
Type identifier docker
Runner Dashboard or Agent
Target in the email Container

Fields

Field Key Default Meaning
Container name container_name Required. Exact container name as printed by docker ps --format "{{.Names}}"

Behaviour

Situation Status Message
Running, HEALTHCHECK reports healthy OK healthy
Running, no HEALTHCHECK defined OK running
Running, HEALTHCHECK reports starting UNKNOWN starting
Running, HEALTHCHECK reports unhealthy WARN unhealthy
Running, any other health status FAIL the status
Not running FAIL Container "<name>" is not running
Container not found or API error FAIL Docker API error: Container not found (404) or another error
Socket missing UNKNOWN Docker socket not available at /var/run/docker.sock
No container name UNKNOWN No container_name configured

Requirements

The Docker socket must be mounted in the container that runs the check:

The socket gives access to the Docker daemon API. Even when mounted read-only (:ro), containers can be controlled through it. Mount it only where you really need Docker checks.