diff --git a/templates/config.alloy.erb b/templates/config.alloy.erb index d7fc811..76399f2 100644 --- a/templates/config.alloy.erb +++ b/templates/config.alloy.erb @@ -25,7 +25,11 @@ loki.relabel "add_labels" { source_labels = ["__host__"] target_label = "hostname" } - + rule { + action = "replace" + target_label = "hostname" + replacement = "${env.HOSTNAME}" + } rule { action = "replace" target_label = "job"