From 9d048f0897eb3556e93c877fd11679f22f3f8d74 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Mon, 24 Jun 2024 15:39:12 -0700 Subject: [PATCH] chore(monitoring): more journald labels --- modules/nixos/monitoring/source/promtail.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/nixos/monitoring/source/promtail.nix b/modules/nixos/monitoring/source/promtail.nix index a7b194fd..c4c64ebf 100644 --- a/modules/nixos/monitoring/source/promtail.nix +++ b/modules/nixos/monitoring/source/promtail.nix @@ -32,7 +32,7 @@ in { { job_name = "${systemConfig.name}-journald"; journal = { - json = true; + #json = true; max_age = "${toString (24 * 7)}h"; labels = mkMerge [ { @@ -50,6 +50,14 @@ in { source_labels = ["__journal_syslog_identifier"]; target_label = "syslog_identifier"; } + { + source_labels = ["__journal_priority_keyword"]; + target_label = "priority_keyword"; + } + { + source_labels = ["__journal_priority"]; + target_label = "priority"; + } ]; } (mkIf nginx.enable {