From 214c59b7b34a0cce592e87eec74e18ccb47c3868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Sat, 7 Oct 2023 03:58:59 +0200 Subject: [PATCH] metrics: Add systemd monitoring --- configuration/services/metrics/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configuration/services/metrics/default.nix b/configuration/services/metrics/default.nix index 4086ef2..53a8a1d 100644 --- a/configuration/services/metrics/default.nix +++ b/configuration/services/metrics/default.nix @@ -64,7 +64,6 @@ in { node = { enable = true; - enabledCollectors = ["systemd"]; listenAddress = "127.0.0.1"; }; @@ -98,6 +97,16 @@ in { }) config.services.nginx.virtualHosts; }; + + systemd = { + enable = true; + listenAddress = "127.0.0.1"; + extraFlags = [ + # Disabled by default because only supported from systemd 235+ + "--systemd.collector.enable-restart-count" + "--systemd.collector.enable-ip-accounting" + ]; + }; }; services.prometheus.local-exporters = {