nixos-servers/nix/modules/monitoring/gatus-endpoints.nix

193 lines
4.4 KiB
Nix
Raw Normal View History

2024-03-05 19:56:00 +00:00
let
status = code: "[STATUS] == ${toString code}";
bodyContains = text: "[BODY] == pat(*${text}*)";
maxResponseTime = ms: "[RESPONSE_TIME] < ${toString ms}";
endpoints = [
{
name = "Forgejo";
url = "https://git.kun.is";
conditions = [
(status 200)
(bodyContains "Forgejo: Beyond coding. We forge.")
(maxResponseTime 750)
];
}
{
name = "Nextcloud";
url = "https://cloud.kun.is/status.php";
conditions = [
(status 200)
"[BODY].installed == true"
"[BODY].maintenance == false"
"[BODY].needsDbUpgrade == false"
2024-03-05 20:50:43 +00:00
(maxResponseTime 1000)
2024-03-05 19:56:00 +00:00
];
}
{
name = "Paperless-ngx";
url = "https://paperless.kun.is/accounts/login/";
conditions = [
(status 200)
(bodyContains "Please sign in.")
(maxResponseTime 750)
];
}
{
name = "Radicale";
url = "https://dav.kun.is/.web/";
conditions = [
(status 200)
(bodyContains "Login")
(maxResponseTime 750)
];
}
{
name = "FreshRSS";
url = "https://rss.kun.is/i/";
conditions = [
(status 200)
(bodyContains "Login")
(maxResponseTime 750)
];
}
{
name = "KitchenOwl";
url = "https://boodschappen.kun.is/signin";
conditions = [
(status 200)
(bodyContains "<title>KitchenOwl</title>")
(maxResponseTime 750)
];
}
{
name = "HedgeDoc";
url = "https://md.kun.is/";
conditions = [
(status 200)
(bodyContains "The best platform to write and share markdown.")
(maxResponseTime 750)
];
}
{
name = "Cyberchef";
url = "https://cyberchef.kun.is/";
conditions = [
(status 200)
(bodyContains "CyberChef - The Cyber Swiss Army Knife")
(maxResponseTime 750)
];
}
{
name = "Pi-hole";
url = "https://pihole.kun.is:444/admin/login.php";
conditions = [
(status 200)
(bodyContains "Log in")
(maxResponseTime 750)
];
}
{
name = "Inbucket";
url = "https://inbucket.kun.is:444/";
conditions = [
(status 200)
(bodyContains "<title>Inbucket</title>")
(maxResponseTime 750)
];
}
{
name = "kms";
url = "tcp://kms.kun.is:1688";
conditions = [
"[CONNECTED] == true"
];
}
{
name = "Bazarr";
url = "https://bazarr.kun.is:444/system/status";
conditions = [
(status 200)
(bodyContains "<title>Bazarr</title>")
(maxResponseTime 750)
];
}
{
name = "Sonarr";
url = "https://sonarr.kun.is:444/system/status";
conditions = [
(status 200)
(bodyContains "<title>Sonarr</title>")
(maxResponseTime 750)
];
}
{
name = "Radarr";
url = "https://radarr.kun.is:444/system/status";
conditions = [
(status 200)
(bodyContains "<title>Radarr</title>")
(maxResponseTime 750)
];
}
{
name = "Jellyfin";
url = "https://media.kun.is/web/index.html#!/login.html?";
conditions = [
(status 200)
(bodyContains "<title>Jellyfin</title>")
(maxResponseTime 750)
];
}
{
name = "Jellyseerr";
url = "https://jellyseerr.kun.is:444/login";
conditions = [
(status 200)
(bodyContains "Sign in to continue")
(maxResponseTime 750)
];
}
{
name = "Prowlarr";
url = "https://prowlarr.kun.is:444/system/status";
conditions = [
(status 200)
(bodyContains "<title>Prowlarr</title>")
(maxResponseTime 750)
];
}
{
name = "Transmission";
url = "https://transmission.kun.is:444/transmission/web/";
conditions = [
(status 200)
(bodyContains "Transmission Web Interface")
(maxResponseTime 750)
];
}
{
name = "Syncthing";
url = "https://sync.kun.is:444/";
conditions = [
(status 401)
(maxResponseTime 750)
];
}
{
name = "Traefik";
url = "https://traefik.kun.is:444/dashboard/#/";
conditions = [
(status 200)
(bodyContains "<title>Traefik</title>")
(maxResponseTime 750)
];
}
];
in
2024-03-05 20:50:43 +00:00
map
(endpoint: endpoint // {
interval = "5m";
alerts = [{ type = "email"; }];
})
endpoints