From 77388a6d8c37a830fee8dbaaf399fb7df8463928 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Tue, 11 Mar 2025 14:40:39 +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 05b58e2..2131b0f 100644 --- a/templates/config.alloy.erb +++ b/templates/config.alloy.erb @@ -25,6 +25,11 @@ loki.relabel "add_labels" { source_labels = ["__host__"] target_label = "hostname" } + rule { + action = "replace" + source_label = "__host__" + target_label = "hostname" + } rule { action = "replace" target_label = "hostname"