Skip to content

Commit

Permalink
F
Browse files Browse the repository at this point in the history
  • Loading branch information
nahsi committed Mar 13, 2024
1 parent b4fcbe2 commit 058522f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions roles/promtail/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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<time>\S+)\s+(?P<level>\S+)\s+\S+'
Expand All @@ -63,7 +67,7 @@ fluence_promtail_config:
source: "nox"

- match: # collect ccp logs
selector: '{__journal_systemd_unit="ccp.service"}'
selector: '{unit="ccp.service"}'
stages:
- multiline:
firstline: '^(?P<time>\S+)\s+(?P<level>\S+)\s+\S+'
Expand All @@ -82,3 +86,4 @@ fluence_promtail_config:
drop_counter_reason: "journald-filter"
- labeldrop:
- filtered
- unit

0 comments on commit 058522f

Please sign in to comment.