Hi,
how can I add the full path + filename of a logfile from loki.source.file as a label?
I tested with relabel, see below, but there is no label filename
.
loki.source.file "logs_integrations_test" {
targets = local.file_match.logs_integrations_test.targets
forward_to = [loki.relabel.logs_integrations_test.receiver]
}
loki.relabel "logs_integrations_test" {
forward_to = [loki.write.grafana_cloud_loki.receiver]
rule {
source_labels = ["__path__"]
target_label = "filename"
}
}