diff --git a/templates/config.alloy.erb b/templates/config.alloy.erb index 76399f2..05b58e2 100644 --- a/templates/config.alloy.erb +++ b/templates/config.alloy.erb @@ -30,6 +30,11 @@ loki.relabel "add_labels" { target_label = "hostname" replacement = "${env.HOSTNAME}" } + rule { + action = "replace" + source_label = "${env.HOSTNAME}" + target_label = "hostname" + } rule { action = "replace" target_label = "job"