From 477c0eb5d15c2f4b47bc22ff68adbb0747a2ca8f Mon Sep 17 00:00:00 2001 From: Vladimir Eremin Date: Sat, 11 Jul 2026 16:49:56 +0300 Subject: [PATCH] fix: set alloy container hostname to APEX_NODE_HOST node_exporter's uname collector reports the container's UTS hostname as node_uname_info{nodename}, which Docker defaults to the container id. Grafana surfaces that as the host, so every node showed a hex id instead of its name. Setting hostname on the alloy service makes nodename the node's public host. node/instance labels were already correct via the config.alloy relabel. --- 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 f7b6bf9..8210e65 100644 --- a/compositions/apex/docker-compose.yml +++ b/compositions/apex/docker-compose.yml @@ -188,6 +188,7 @@ services: alloy: 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) profiles: [alloy] user: "0:0" # root: required for host metrics, journal, and docker.sock volumes: