Watchflare docs
Sur cette page
Cette page n'est pas encore disponible en français. Vous lisez la version anglaise.

Container metrics overview

View per-container CPU, memory, and network metrics in Watchflare. Read per-container stats and time-range charts from Docker and Podman workloads.

Watchflare can collect per-container metrics from Docker hosts: CPU usage, memory, and network I/O for each running container. This feature is opt-in.


Enabling container metrics

Container metrics must be enabled on the agent. See Docker container metrics for setup instructions.

In short:

  • At install time: pass --containers to the install or register command.
  • On an existing agent: add watchflare to the docker group, set container_metrics = true in agent.conf, and restart the service.

What is collected

Metrics are collected per running container at the same interval as system metrics (every 30 seconds):

MetricDescription
CPU %Per-container CPU usage across all cores
Memory usedCurrent memory consumption
Memory limitContainer memory limit, if set
Network RXInbound bytes/s
Network TXOutbound bytes/s

Each container is identified by its name and image. Stopped containers are not collected.

Note

Container metrics are sent point-in-time and are not buffered in the Write-Ahead Log. If the Hub is unreachable, container metrics for that period are lost. System metrics (CPU, memory, disk, etc.) are unaffected — they accumulate in the WAL and are replayed on reconnect.


Viewing container metrics

Container metrics appear in the Containers tab on the host detail page. The tab is only visible if the agent has container_metrics = true in its config and has sent at least one container metrics batch.

The tab shows:

  • A table of all running containers with their current CPU and memory values
  • Per-container charts for CPU, memory, and network over the selected time range

Time ranges and resolution are the same as system metrics — see System metrics.


Global containers view

The Containers entry in the sidebar opens a fleet-wide view of every running container across all hosts in a single table. It is useful for finding where a given image runs, comparing resource usage side by side, or spotting containers whose host has gone offline.

Three summary cards sit at the top:

CardMeaning
ContainersTotal number of containers currently tracked across the fleet
LiveContainers whose host is online and reporting
StaleContainers whose host is offline. Their row shows the last known state, which may no longer be accurate

The Live / Stale distinction reflects the host, not the container. When a host stops reporting, its containers keep their last known values and are flagged Stale rather than removed from the list.

Filtering

  • Search matches on container name or image.
  • Host narrows the list to a single host.
  • Runtime filters by container runtime (Docker, Podman, etc.).
  • Liveness filters to Live or Stale containers only.

Click any row to open a detail drawer with the container’s full image, ports, health, and per-metric values.

Note

The list refreshes every 60 seconds by polling, independently of the live SSE stream used on host detail pages. Only running containers appear: the agent reports running containers only, so stopped containers are never listed. The view only shows containers from hosts that have container metrics enabled.


Requirements

  • Docker Engine 23.0+ (API v1.44+) or Podman with a compatible API socket
  • The watchflare user must be in the docker group (Linux)
  • Docker socket at /var/run/docker.sock or Podman socket at /run/podman/podman.sock

Note

On macOS (Docker Desktop or Colima), the agent runs as the current user who already has Docker socket access. No group change is needed.


Containers vs. host metrics

When the agent itself runs inside a Docker container (rather than on the host), container metrics are not available — the agent cannot reach the Docker socket from inside the container. Install the agent directly on the host OS to enable container metric collection.