Modify `promtail` config for `init` journal.
This commit is contained in:
parent
6cabd89504
commit
81822f12d3
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue