diff --git a/cookbooks/promtail/templates/etc/promtail/base.yaml b/cookbooks/promtail/templates/etc/promtail/base.yaml index 3f73651..46df03b 100644 --- a/cookbooks/promtail/templates/etc/promtail/base.yaml +++ b/cookbooks/promtail/templates/etc/promtail/base.yaml @@ -208,9 +208,29 @@ scrape_configs: path: /var/log/journal labels: job: init - level: notice hostname: <%= @HOSTNAME %> + pipeline_stages: + - match: + selector: '{job="init"} |~ "(apt download|Message of the Day)"' + stages: + - template: + source: level + template: 'info' + + - labels: + level: + + - match: + selector: '{job="init"} !~ "(apt download|Message of the Day)"' + stages: + - template: + source: level + template: 'notice' + + - labels: + level: + relabel_configs: - action: keep regex: 'init\.scope'