Type: docker | Runner: Dashboard or Agent
Connects to the Docker socket and queries the container's state. Uses the container's built-in Docker HEALTHCHECK if one is defined; otherwise falls back to checking whether the container is simply running.
HEALTHCHECK defined, its status is healthy| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
container_name |
text | Yes | — | Exact container name as shown in docker ps --format "{{.Names}}" (e.g. my-app, watchdog-stage-app) |
| Status | Condition |
|---|---|
| OK | Container is running, no healthcheck defined — message: running |
| OK | Container is running, healthcheck reports healthy |
| Warn | Container is running, healthcheck reports unhealthy |
| Unknown | Container is running, healthcheck is still starting |
| Fail | Container is not running |
| Fail | Docker API error (container not found, connection error) |
| Unknown | Docker socket not available at /var/run/docker.sock |
| Unknown | No container name configured |
This check communicates via the Docker socket at /var/run/docker.sock.
Dashboard worker: The socket is already mounted in the default compose files:
# compose.stage.yml
worker:
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
Agent: Uncomment the Docker socket in the agent service or docker-compose.agent.yml:
agent:
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
docker ps --format "{{.Names}}" to get the exact name.Warn and Fail for unhealthy seems counterintuitive: Docker's unhealthy status means the healthcheck has failed — Watchdog maps this to Warn to distinguish from a fully stopped container (Fail).