diff --git a/roles/promtail/defaults/main.yml b/roles/promtail/defaults/main.yml index 2edc203..8449916 100644 --- a/roles/promtail/defaults/main.yml +++ b/roles/promtail/defaults/main.yml @@ -47,9 +47,13 @@ fluence_promtail_config: - job_name: "journald" journal: path: "/var/log/journal" + relabel_configs: + # https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html + - source_labels: ['__journal__systemd_unit'] + target_label: "unit" pipeline_stages: - match: # collect nox logs - selector: '{__journal_systemd_unit="nox.service"}' + selector: '{unit="nox.service"}' stages: - multiline: firstline: '^(?P