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"