Docker

How do you monitor Docker containers on a VPS?

What goes wrong with Docker on a single VPS: restart loops, unbounded JSON logs, dangling images filling the disk. Tools compared, fixes included.

By , Director of Softuvo Solutions (LinkedIn) · Updated

In short

To monitor Docker containers on a VPS, watch four things the Docker daemon will not warn you about: containers in a restart loop, per-container JSON logs growing without a cap, images and build cache filling the disk, and a database container with its port published to the internet. Opservo reads these from the Docker socket, clusters container logs, and includes the fix for each.

What fails on Docker hosts that nobody notices?

  • •A container with restart: always crashing every 30 seconds; docker ps says "Up 12 seconds" forever
  • •JSON log files under /var/lib/docker/containers growing to tens of gigabytes because no max-size was set
  • •Dangling images, stopped containers and build cache eating the root volume after months of deploys
  • •A MySQL, Postgres, Redis or Mongo container started with -p 3306:3306 and no firewall, reachable from the internet
  • •A container quietly OOM-killed and restarted, losing in-memory state each time
  • •Memory and CPU limits absent, so one container can starve the host

What does Opservo collect from Docker?

From the Docker socket, read-only: every container with its image, state, restart count, published ports and resource usage, and container logs, which are clustered into patterns and summarized rather than stored raw. Databases running as containers are inspected with docker exec status commands, so MySQL, Redis and PostgreSQL in containers get the same insights as on the host. Volume-level disk growth is forecast by the Watchdog.

Which tools monitor Docker on a VPS, and what does each cover?

On a single VPS the question is less "which tool is most powerful" and more "which tool leaves memory for the containers". From lightest to heaviest:

ToolWhat it isWhat it coversPricing model
docker stats, docker logs, docker eventsBuilt into DockerLive CPU, memory and I/O per container, logs, lifecycle events; no history, no alertsFree
OpservoHosted agent on the host, no exporter or sidecarEvery container with restart count, published ports and resources; logs clustered into patterns; MySQL, Redis and Postgres containers inspected; disk forecast; the fix per findingFree for 2 servers; then ₹999 (about $12) per server per month
NetdataOpen-source agent with a Docker pluginReal-time per-container charts on the node; cloud for history and alertsAgent is free; cloud plans are paid
cAdvisor + Prometheus + GrafanaSelf-hosted metrics stackPer-container metrics with history, dashboards and alert rules you write; the stack itself uses memory on a small VPSFree software; your time and RAM
Uptime Kuma or UptimeRobotExternal checksWhether the site answers; nothing about the containers behind itFree tier or self-hosted; paid by monitors
DatadogHosted platform, agent as a containerContainer metrics, logs, APM, dashboardsPer host plus add-ons for logs, APM and containers

Compared on 20 October 2026. Pricing describes each vendor’s published model; see their pricing pages for current numbers. Only Opservo’s prices are quoted.

What should alert?

  • •A container that has restarted more than three times, which means it crashes shortly after starting
  • •A database container port published on 0.0.0.0 with no firewall rule, as a security critical
  • •Disk growth projected to fill the volume, with the prune and log-cap fix
  • •A recurring error pattern in a container’s logs that was not there yesterday

What are the fixes?

# why is it restarting
docker logs --tail 100 <name>
docker inspect <name> --format "{{.State.ExitCode}} {{.State.OOMKilled}}"
# reclaim space
docker system prune -af
# cap logs for every new container: /etc/docker/daemon.json
{ "log-opts": { "max-size": "50m", "max-file": "3" } }
# publish a database only on localhost
-p 127.0.0.1:3306:3306

Each of these is attached to the matching Opservo finding and can be run from the dashboard on servers with remote actions enabled. A crashed container restart is a good first autonomous policy.

Last updated 2026-10-20.

FAQ

Related questions

What should Docker container monitoring cover?+

Five things. Container state and restart count, because a container stuck in a restart loop is the most common silent failure. CPU and memory use per container. Disk used by images, volumes and container logs, which is what usually fills a VPS. The container’s own logs, so a crash comes with its last error. And the host underneath, since every container shares its disk, memory and kernel. Opservo’s agent reads containers straight from the Docker socket on every heartbeat, with no exporter or sidecar, and reports the host alongside them.

Do I need cAdvisor or a Prometheus exporter?+

No. The agent reads the Docker socket directly and reports containers, resources and disk usage on every heartbeat. Metrics can still be exported to Prometheus or Grafana from Opservo if you want your own dashboards.

Does it monitor Docker Compose stacks?+

Yes. Compose services are ordinary containers to the Docker socket; each appears with its state, restarts and clustered logs like any other container.

What about Kubernetes?+

Kubernetes clusters use a separate read-only in-cluster agent that reports workloads, pods, crash loops with exit codes and log tails, resources and events. It is installed with one kubectl apply.

Are container logs stored?+

Not raw. The agent ships normalized entries; the API keeps only clustered patterns with counts and an AI summary, so log volume does not affect price or privacy.