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
|
path: /var/log/journal
|
||||||
labels:
|
labels:
|
||||||
job: init
|
job: init
|
||||||
level: notice
|
|
||||||
hostname: <%= @HOSTNAME %>
|
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:
|
relabel_configs:
|
||||||
- action: keep
|
- action: keep
|
||||||
regex: 'init\.scope'
|
regex: 'init\.scope'
|
||||||
|
|
Loading…
Reference in New Issue