From b4c5a7b0a513b1796731bb86216c08551ad8747d Mon Sep 17 00:00:00 2001 From: Joonas Rautiola Date: Thu, 19 Dec 2024 13:16:48 +0200 Subject: [PATCH] Fix node-exporter wrong filesystem reading Signed-off-by: Joonas Rautiola --- services/monitoring/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/monitoring/default.nix b/services/monitoring/default.nix index 7dbea506..d0e6ee5c 100644 --- a/services/monitoring/default.nix +++ b/services/monitoring/default.nix @@ -49,6 +49,11 @@ in }; }; + # with ProtectHome=true, the exporter will report incorrect filesystem bytes for /home + systemd.services.prometheus-node-exporter.serviceConfig = lib.mkIf cfg.metrics.enable { + ProtectHome = lib.mkForce "read-only"; + }; + # sshified user for monitoring server to log in as users.users.sshified = lib.mkIf cfg.metrics.ssh { isNormalUser = true;