Modify the base configuration for `promtail`.
This commit is contained in:
parent
2efe201394
commit
c37124a212
|
@ -56,7 +56,7 @@ scrape_configs:
|
||||||
labels:
|
labels:
|
||||||
job: sshd
|
job: sshd
|
||||||
hostname: <%= @HOSTNAME %>
|
hostname: <%= @HOSTNAME %>
|
||||||
level: warning
|
level: info
|
||||||
__path__: /var/log/auth.log
|
__path__: /var/log/auth.log
|
||||||
|
|
||||||
pipeline_stages:
|
pipeline_stages:
|
||||||
|
@ -184,3 +184,40 @@ scrape_configs:
|
||||||
|
|
||||||
- output:
|
- output:
|
||||||
source: message
|
source: message
|
||||||
|
|
||||||
|
- job_name: login
|
||||||
|
journal:
|
||||||
|
json: false
|
||||||
|
max_age: 12h
|
||||||
|
path: /var/log/journal
|
||||||
|
labels:
|
||||||
|
job: login
|
||||||
|
level: notice
|
||||||
|
hostname: <%= @HOSTNAME %>
|
||||||
|
|
||||||
|
relabel_configs:
|
||||||
|
- action: keep
|
||||||
|
regex: 'systemd-logind.service'
|
||||||
|
source_labels:
|
||||||
|
- __journal__systemd_unit
|
||||||
|
|
||||||
|
- job_name: systemd
|
||||||
|
journal:
|
||||||
|
json: false
|
||||||
|
max_age: 12h
|
||||||
|
path: /var/log/journal
|
||||||
|
labels:
|
||||||
|
job: systemd
|
||||||
|
level: info
|
||||||
|
hostname: <%= @HOSTNAME %>
|
||||||
|
|
||||||
|
relabel_configs:
|
||||||
|
- action: keep
|
||||||
|
regex: '.*\.service'
|
||||||
|
source_labels:
|
||||||
|
- __journal__systemd_unit
|
||||||
|
|
||||||
|
- action: drop
|
||||||
|
regex: '.*(cron|supervisor|ssh|promtail|local|grafana|motd|dnsmasq|snapd|logind).*'
|
||||||
|
source_labels:
|
||||||
|
- __journal__systemd_unit
|
||||||
|
|
Loading…
Reference in New Issue