From 669a27fff57cff7dc89c019fb0923d79413a110c Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Wed, 30 Mar 2022 10:52:30 +0200 Subject: [PATCH] FEAT(loki): add journald scraping to promtail --- vars/helm/005-loki.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/vars/helm/005-loki.yml b/vars/helm/005-loki.yml index d800a63..2e7d6ab 100644 --- a/vars/helm/005-loki.yml +++ b/vars/helm/005-loki.yml @@ -3,3 +3,28 @@ loki: chart: grafana/loki-stack url: https://grafana.github.io/helm-charts namespace: metrics + vals: + promtail: + extraScrapeConfigs: + - job_name: journal + journal: + path: /var/log/journal + max_age: 12h + labels: + job: systemd-journal + relabel_configs: + - source_labels: + - '__journal__systemd_unit' + target_label: 'unit' + - source_labels: + - '__journal__hostname' + target_label: 'hostname' + extraVolumes: + - name: journal + hostPath: + path: /var/log/journal + + extraVolumeMounts: + - name: journal + mountPath: /var/log/journal + readOnly: true