diff --git a/templates/config.alloy.erb b/templates/config.alloy.erb index a894822..df6c0db 100644 --- a/templates/config.alloy.erb +++ b/templates/config.alloy.erb @@ -20,15 +20,15 @@ loki.source.file "system_logs" { loki.relabel "add_labels" { forward_to = [loki.write.loki.receiver] - rule { - action = "replace" - source_label = "__host__" - target_label = "hostname" + rule { + action = "replace" + source_labels = ["__host__"] + target_label = "hostname" } - rule { - action = "replace" - source_label = "${env.HOSTNAME}" - target_label = "hostname" + rule { + action = "replace" + source_labels = "${env.HOSTNAME}" + target_label = "hostname" } rule { action = "replace"