From 6c0192f50f0a4a5708b60d00412414d9c1e43787 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Tue, 11 Mar 2025 15:28:26 +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 ddb8809..8427260 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" - target_label = "hostname" - replacement = "${constants.hostname}" + action = "replace" + source_labels = ["__syslog_connection_hostname"] + target_label = "hostname" } rule { action = "replace"