From 0a585cc061cb6f67b9df7a5177fccb73fe941feb Mon Sep 17 00:00:00 2001 From: Vladimir Eremin Date: Sun, 12 Jul 2026 02:52:43 +0300 Subject: [PATCH] fix: run alloy in the host cgroup namespace (cgroup: host) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cadvisor exporter reads /sys/fs/cgroup for per-container stats, but with the default private cgroup namespace it only saw the container's own cgroup — so it emitted machine-root container_* series (one per node, no name label) and no per-container metrics. cgroup: host exposes the host cgroup tree so cadvisor enumerates every container (mapped to names via the docker socket). --- compositions/apex/docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/compositions/apex/docker-compose.yml b/compositions/apex/docker-compose.yml index 6a583db..b884935 100644 --- a/compositions/apex/docker-compose.yml +++ b/compositions/apex/docker-compose.yml @@ -192,6 +192,7 @@ services: image: grafana/alloy:v1.17.1 container_name: apex-alloy hostname: "${APEX_NODE_HOST}" # UTS hostname => node_exporter's node_uname_info `nodename` (else the container id) + cgroup: host # host cgroup namespace: the cadvisor exporter needs it to read per-container cgroups (else machine-root only) profiles: [alloy] user: "0:0" # root: required for host metrics, journal, and docker.sock volumes: