Monitor Docker hosts with a single container
Run the agent as a container with the host’s /proc, /sys and root filesystem mounted read-only. It reports the host’s metrics — not the container’s — so you see the real picture of the machine your containers share.
What to monitor on Docker
- 01Host CPU and loadOne container can starve all the others; host-level CPU shows it.
- 02Host memoryContainers without memory limits can push the host into OOM.
- 03/var/lib/docker disk usageImages, build cache and container logs fill disks silently. Run docker system prune before it bites.
- 04ProcessesContainer processes appear in the host process list with their names.
Set it up
Start the agent container
--pid host and the read-only mounts let it see host metrics.
docker run -d --name statance-agent --restart unless-stopped --pid host --network host -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /:/host/root:ro -e STATANCE_KEY=YOUR_API_KEY ghcr.io/statance/agent:latestOr use Compose
Add it as a service in docker-compose.yml with the same mounts and STATANCE_KEY env var.
Check logs
docker logs statance-agent
Recommended alerts for Docker
- Server stopped reporting for 5 minutes (down)
- CPU above 90% for 10 minutes
- Memory used above 90% for 5 minutes
- Any disk above 85% used
- /var/lib/docker volume above 80%
Send alerts to
Docker monitoring FAQ
Does it report per-container CPU and memory?
The agent reports host metrics and the top processes, which include container processes. Per-container breakdowns are on the roadmap.
Why does it need --pid host?
Without the host PID namespace the process list would only show the agent itself.
Can I monitor the apps inside my containers too?
Yes — add HTTP or TCP monitors for the ports your containers expose, and heartbeat monitors for scheduled jobs.
Know before your users do.
Free forever for 3 servers and 10 monitors. No credit card. Install the agent in under a minute.