diff options
Diffstat (limited to 'nixos/hosts/tente/monitoring.nix')
-rw-r--r-- | nixos/hosts/tente/monitoring.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/nixos/hosts/tente/monitoring.nix b/nixos/hosts/tente/monitoring.nix index 7e92eed..eaddacb 100644 --- a/nixos/hosts/tente/monitoring.nix +++ b/nixos/hosts/tente/monitoring.nix @@ -180,8 +180,8 @@ in forward_to = [loki.write.default.receiver] stage.match { - // Select messages from systemd services that have LogExtraFields=log_format=logfmt. - selector = "{__journal_log_format=\"logfmt\"}" + // Select messages from systemd services that have LogExtraFields=LOG_FORMAT=logfmt. + selector = "{__journal_LOG_FORMAT=\"logfmt\"}" stage.logfmt { mapping = { time = "", level = "" } } @@ -189,6 +189,11 @@ in source = "time" format = "RFC3339" } + stage.template { + // The slog package of the Go standard library prints levels as uppercase. + source = "level" + template = "{{ ToLower .Value }}" + } stage.structured_metadata { values = { level = "" } } |