From 2f8aea6066afb0c0fa0a7ec30e8cfb696f166aa4 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Tue, 11 Mar 2025 15:20:05 +0100 Subject: [PATCH] full cycle hostname label --- templates/config.alloy.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/config.alloy.erb b/templates/config.alloy.erb index 7cb40e8..ddb8809 100644 --- a/templates/config.alloy.erb +++ b/templates/config.alloy.erb @@ -21,9 +21,9 @@ loki.relabel "add_labels" { forward_to = [loki.write.loki.receiver] rule { - action = "replace" - source_labels = ["__hostname__"] - target_label = "hostname" + action = "replace" + target_label = "hostname" + replacement = "${constants.hostname}" } rule { action = "replace"