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