vps-monitor: Disable gatus notifications

This commit is contained in:
SebastianStork 2026-03-01 14:33:03 +01:00
parent 21e99f1353
commit b80fc49dee
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
2 changed files with 9 additions and 17 deletions

View file

@ -32,18 +32,7 @@
enable = true; enable = true;
domain = "status.${privateDomain}"; domain = "status.${privateDomain}";
generateDefaultEndpoints = true; generateDefaultEndpoints = true;
endpoints = { endpoints."dav.${sproutedDomain}".enable = false;
"dav.${sproutedDomain}".enable = false;
"alerts.${sproutedDomain}" = {
path = "/v1/health";
extraConditions = [ "[BODY].healthy == true" ];
};
};
};
ntfy = {
enable = true;
domain = "alerts.${sproutedDomain}";
}; };
}; };
}; };

View file

@ -19,10 +19,13 @@ in
type = lib.types.port; type = lib.types.port;
default = 8080; default = 8080;
}; };
alerts = {
enable = lib.mkEnableOption "";
ntfyUrl = lib.mkOption { ntfyUrl = lib.mkOption {
type = lib.types.nonEmptyStr; type = lib.types.nonEmptyStr;
default = "https://${config.custom.web-services.ntfy.domain}"; default = "https://${config.custom.web-services.ntfy.domain}";
}; };
};
generateDefaultEndpoints = lib.mkEnableOption ""; generateDefaultEndpoints = lib.mkEnableOption "";
endpoints = lib.mkOption { endpoints = lib.mkOption {
type = lib.types.attrsOf ( type = lib.types.attrsOf (
@ -62,7 +65,7 @@ in
default = [ ]; default = [ ];
}; };
enableAlerts = lib.mkEnableOption "" // { enableAlerts = lib.mkEnableOption "" // {
default = true; default = cfg.alerts.enable;
}; };
}; };
} }
@ -112,7 +115,7 @@ in
path = "${dataDir}/data.db"; path = "${dataDir}/data.db";
}; };
connectivity.checker.target = "1.1.1.1:53"; # Cloudflare DNS connectivity.checker.target = "1.1.1.1:53"; # Cloudflare DNS
alerting.ntfy = { alerting.ntfy = lib.mkIf cfg.alerts.enable {
topic = "uptime"; topic = "uptime";
url = cfg.ntfyUrl; url = cfg.ntfyUrl;
click = "https://${cfg.domain}"; click = "https://${cfg.domain}";