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
--containersto the install or register command. - On an existing agent: add
watchflareto thedockergroup, setcontainer_metrics = trueinagent.conf, and restart the service.
What is collected
Metrics are collected per running container at the same interval as system metrics (every 30 seconds):
| Metric | Description |
|---|---|
| CPU % | Per-container CPU usage across all cores |
| Memory used | Current memory consumption |
| Memory limit | Container memory limit, if set |
| Network RX | Inbound bytes/s |
| Network TX | Outbound 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:
| Card | Meaning |
|---|---|
| Containers | Total number of containers currently tracked across the fleet |
| Live | Containers whose host is online and reporting |
| Stale | Containers 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
watchflareuser must be in thedockergroup (Linux) - Docker socket at
/var/run/docker.sockor 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.