Adding hostname labels into the systemd-journal job for promtail agent

This commit is contained in:
Noah L. Schrick 2023-07-25 21:40:52 -05:00
parent 71f0431808
commit f4d8755f8e

View File

@ -23,6 +23,8 @@ scrape_configs:
labels: labels:
job: systemd-journal job: systemd-journal
relabel_configs: relabel_configs:
- source_labels: ["__journal__hostname"]
target_label: "hostname"
- source_labels: ["__journal__systemd_unit"] - source_labels: ["__journal__systemd_unit"]
target_label: "unit" target_label: "unit"
- source_labels: ["__journal_container_name"] - source_labels: ["__journal_container_name"]