monitoring: ignore sshfs filesystems

This commit is contained in:
Aaron Bieber 2023-06-25 05:37:36 -06:00
parent 8469b8d4a8
commit 60c663db4a
No known key found for this signature in database

View File

@ -7,11 +7,13 @@ let
nginxCfg = config.services.nginx;
buildFSChecker = fsList:
(concatStringsSep "\n" (attrValues (mapAttrs (f: _: ''
check filesystem ${replaceStrings [ "/" ] [ "_" ] f} with path ${f}
if space usage > 90% then alert
if inode usage > 90% then alert
'') fsList)));
(concatStringsSep "\n" (attrValues (mapAttrs (f: v:
if v.fsType != "sshfs" then ''
check filesystem ${replaceStrings [ "/" ] [ "_" ] f} with path ${f}
if space usage > 90% then alert
if inode usage > 90% then alert
'' else
"") fsList)));
buildNginxChecker = vhostList:
(concatStringsSep "\n" (attrValues (mapAttrs (f: v: ''
check host ${f} with address ${f}