From 71c00d0cce869689c40662c88c422f2a25ad62c9 Mon Sep 17 00:00:00 2001 From: Julian Rother Date: Tue, 19 Nov 2024 04:06:33 +0100 Subject: [PATCH] promtail: Add level metadata field for systemd-journal --- templates/promtail.yml.j2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/promtail.yml.j2 b/templates/promtail.yml.j2 index 16d8ebb..30c4240 100644 --- a/templates/promtail.yml.j2 +++ b/templates/promtail.yml.j2 @@ -28,6 +28,11 @@ scrape_configs: relabel_configs: - source_labels: ['__journal__systemd_unit'] target_label: 'unit' + - source_labels: ['__journal_priority_keyword'] + target_label: 'level' + pipeline_stages: + - structured_metadata: + level: - job_name: nginx static_configs: - targets: