source hostname label

This commit is contained in:
Arne Teuke
2025-03-11 13:20:04 +01:00
parent fb764518d3
commit 54f5664513

View File

@@ -50,12 +50,12 @@ loki.relabel "add_labels" {
source_labels = ["hostname"] source_labels = ["hostname"]
target_label = "hostname" target_label = "hostname"
} }
rule { //rule {
source_labels = ["hostname_fallback"] // source_labels = ["hostname_fallback"]
target_label = "hostname" // target_label = "hostname"
action = "replace" // action = "replace"
replacement = "${__label:hostname_fallback}" // Only if hostname is unset // replacement = "${__label:hostname_fallback}" // Only if hostname is unset
} //}
} }
loki.write "loki" { loki.write "loki" {