From 6448cea9a51cab097632f9f3a8feca5790ac5660 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Tue, 11 Mar 2025 14:40:09 +0100 Subject: [PATCH] add hostname label --- templates/config.alloy.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/config.alloy.erb b/templates/config.alloy.erb index 76399f2..05b58e2 100644 --- a/templates/config.alloy.erb +++ b/templates/config.alloy.erb @@ -30,6 +30,11 @@ loki.relabel "add_labels" { target_label = "hostname" replacement = "${env.HOSTNAME}" } + rule { + action = "replace" + source_label = "${env.HOSTNAME}" + target_label = "hostname" + } rule { action = "replace" target_label = "job"