From f4d8755f8e62d0ada693d9631ff8c90e5181fc82 Mon Sep 17 00:00:00 2001 From: noah Date: Tue, 25 Jul 2023 21:40:52 -0500 Subject: [PATCH] Adding hostname labels into the systemd-journal job for promtail agent --- promtail-agent/promtail/promtail-config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/promtail-agent/promtail/promtail-config.yml b/promtail-agent/promtail/promtail-config.yml index 00c6aaa..314af03 100644 --- a/promtail-agent/promtail/promtail-config.yml +++ b/promtail-agent/promtail/promtail-config.yml @@ -23,6 +23,8 @@ scrape_configs: labels: job: systemd-journal relabel_configs: + - source_labels: ["__journal__hostname"] + target_label: "hostname" - source_labels: ["__journal__systemd_unit"] target_label: "unit" - source_labels: ["__journal_container_name"]