diff options
author | Martin Fischer <martin@push-f.com> | 2025-03-23 21:17:38 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2025-03-26 08:50:12 +0100 |
commit | 59fa8a9cdc8f7f5cb2bf6d9c42d9f1b6b8197bbb (patch) | |
tree | 3e8fe5f2ee9539692bc88d5814b81f52c9e24fde | |
parent | dbc3621c794806b2a8badad292b909610108fc74 (diff) |
tweak(tente): use logfmt for osm-proposals
-rw-r--r-- | nixos/hosts/tente/monitoring.nix | 21 | ||||
-rw-r--r-- | nixos/npins/sources.json | 4 |
2 files changed, 22 insertions, 3 deletions
diff --git a/nixos/hosts/tente/monitoring.nix b/nixos/hosts/tente/monitoring.nix index b9c806e..7e92eed 100644 --- a/nixos/hosts/tente/monitoring.nix +++ b/nixos/hosts/tente/monitoring.nix @@ -169,13 +169,32 @@ in loki.source.journal "journal" { max_age = "12h0m0s" relabel_rules = discovery.relabel.journal.rules - forward_to = [loki.write.default.receiver] + forward_to = [loki.process.journal.receiver] labels = { host = "tente", job = "systemd-journal", } } + loki.process "journal" { + forward_to = [loki.write.default.receiver] + + stage.match { + // Select messages from systemd services that have LogExtraFields=log_format=logfmt. + selector = "{__journal_log_format=\"logfmt\"}" + stage.logfmt { + mapping = { time = "", level = "" } + } + stage.timestamp { + source = "time" + format = "RFC3339" + } + stage.structured_metadata { + values = { level = "" } + } + } + } + discovery.relabel "journal" { targets = [] diff --git a/nixos/npins/sources.json b/nixos/npins/sources.json index 63867b5..5d0d4d9 100644 --- a/nixos/npins/sources.json +++ b/nixos/npins/sources.json @@ -33,9 +33,9 @@ "url": "https://git.push-f.com/osm-proposals" }, "branch": "master", - "revision": "232f1499bb9a2cc85a63abcc1c22776ef77781fb", + "revision": "2ee6afdf3356dea2aebdd48d20dfe9eb07037ba3", "url": null, - "hash": "0g40fzpnrpcaxj6m19fbgwh5x11sbi1h037q5av4x5z7ifxg2dpy" + "hash": "14j48alysvx4n06my3kspsbplx23sv07nvswrya1x3swmwn4mnnc" }, "my-spec-pub": { "type": "Git", |