From db8c831c2f7ae9d9dcb70e255129e21d4b9df9d7 Mon Sep 17 00:00:00 2001 From: emilylange Date: Mon, 8 Jul 2024 00:30:17 +0200 Subject: [PATCH] grafana-agent: set `hostname` label on all metrics This is handy to quickly see all metrics exported by a node, without having to mangle with the already existing `instance` label. `hostname` is essentially a variant of `instance` but without ports. --- services/monitoring/agent.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/services/monitoring/agent.nix b/services/monitoring/agent.nix index dd1e95f..3fc2e0d 100644 --- a/services/monitoring/agent.nix +++ b/services/monitoring/agent.nix @@ -41,6 +41,7 @@ in }; } ]; + global.external_labels.hostname = config.networking.hostName; configs = [ { name = config.networking.hostName;