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"