Promtail config for journald logging, Podman considerations #113
-
Hi Tim, This has been a fantastic resource for getting grafana/loki deployed in my environment! Many thanks! Fedora doesn't configure - job_name: journal
journal:
max_age: 12h
labels:
job: systemd-journal
path: /var/log/journal
relabel_configs:
- source_labels: ['__journal__systemd_unit']
target_label: 'unit'
- source_labels: ['__journal__hostname']
target_label: 'hostname' This also adds the "hostname" label so you can distinguish if you've got multiple hosts sending journald logs to loki. There are additional volumes to pass into the promtail container as well:
For those trying to do this with Podman on Fedora I found that loki and grafana can be run as non-root user in a pod with promtail running separately as root, using the public loki port. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thank you! I will add this to the docs at some point! |
Beta Was this translation helpful? Give feedback.
Thank you! I will add this to the docs at some point!