salt-states/containers/files/promtail.conf.jinja

36 lines
907 B
Django/Jinja

server:
http_listen_port: {{ http_listen_port }}
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
clients:
- url: "{{ client_url }}"
scrape_configs:
- job_name: journal
journal:
max_age: 12h
path: /var/log/journal
labels:
job: systemd-journal
relabel_configs:
- source_labels: ['__journal__systemd_unit']
target_label: 'unit'
- source_labels: ["__journal__hostname"]
target_label: host
- source_labels: ["__journal_priority_keyword"]
target_label: level
- source_labels: ["__journal_syslog_identifier"]
target_label: syslog_identifier
- source_labels: ["__journal_container_name"]
target_label: container_name
- job_name: podman_logs
pipeline_stages:
- cri: {}
static_configs:
- labels:
job: podman_logs
__path__: /var/log/podman/*.log