Skip to content

Commit

Permalink
Fix node-exporter wrong filesystem reading
Browse files Browse the repository at this point in the history
Signed-off-by: Joonas Rautiola <[email protected]>
  • Loading branch information
joinemm committed Dec 19, 2024
1 parent 33fa8ec commit 5eb505a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions services/monitoring/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5eb505a

Please sign in to comment.