add hostname label

This commit is contained in:
Arne Teuke
2025-03-11 14:36:00 +01:00
parent 54a9cdd6bd
commit 86b0e99a86

View File

@@ -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"