From e19d2088c2681a2daf9058423ebd4815ac0270a5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 2 Jan 2022 00:30:52 +0100 Subject: ... --- hosts/vidhar/default.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'hosts') diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index 37485a02..5c58d522 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix @@ -202,11 +202,24 @@ { url = "http://localhost:9094/loki/api/v1/push"; } ]; scrape_configs = [ - { job_name = "system"; + { job_name = "journal"; journal = { json = true; + 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 = "nodename"; + } + ]; }; - } + }; ]; }; }; -- cgit v1.2.3