feat(gatus): add ntfy alerting for all services #132

Merged
wi11-holdsworth merged 3 commits from 123 into main 2026-03-07 13:39:57 +11:00
28 changed files with 93 additions and 1 deletions

View file

@ -24,6 +24,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -48,6 +48,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -48,6 +48,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -31,6 +31,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -1,3 +1,7 @@
{
config,
...
}:
let let
port = 5025; port = 5025;
certloc = "/var/lib/acme/fi33.buzz"; certloc = "/var/lib/acme/fi33.buzz";
@ -8,7 +12,24 @@ in
services = { services = {
gatus = { gatus = {
enable = true; enable = true;
environmentFile = config.age.secrets.gatus.path;
settings = { settings = {
alerting = {
ntfy = {
topic = "services";
url = config.services.ntfy-sh.settings.base-url;
token = "$NTFY_TOKEN";
click = url;
default-alert = {
description = "Health Check Failed";
send-on-resolved = true;
};
};
};
connectivity.checker = {
target = "1.1.1.1:53";
interval = "60s";
};
ui = { ui = {
title = "Health Dashboard | Fi33Buzz"; title = "Health Dashboard | Fi33Buzz";
description = "Fi33Buzz health dashboard"; description = "Fi33Buzz health dashboard";
@ -29,4 +50,6 @@ in
} }
''; '';
}; };
age.secrets.gatus.file = ../../../secrets/gatus.age;
} }

View file

@ -432,6 +432,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -23,6 +23,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -23,6 +23,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -28,6 +28,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -23,6 +23,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -26,6 +26,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -30,6 +30,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -1,3 +1,7 @@
{
config,
...
}:
let let
port = 5002; port = 5002;
certloc = "/var/lib/acme/fi33.buzz"; certloc = "/var/lib/acme/fi33.buzz";
@ -8,6 +12,7 @@ in
services = { services = {
ntfy-sh = { ntfy-sh = {
enable = true; enable = true;
environmentFile = config.age.secrets.ntfy.path;
settings = { settings = {
base-url = url; base-url = url;
listen-http = ":${toString port}"; listen-http = ":${toString port}";
@ -16,8 +21,12 @@ in
auth-users = [ auth-users = [
"Debit3885:$2a$12$ZeFimzdifNFSmf0W2oi.vuZfsqae75md9nhC/Q2BcKMyvDO8T.uEK:admin" "Debit3885:$2a$12$ZeFimzdifNFSmf0W2oi.vuZfsqae75md9nhC/Q2BcKMyvDO8T.uEK:admin"
"borgmatic:$2a$12$ZeFimzdifNFSmf0W2oi.vuZfsqae75md9nhC/Q2BcKMyvDO8T.uEK:user" "borgmatic:$2a$12$ZeFimzdifNFSmf0W2oi.vuZfsqae75md9nhC/Q2BcKMyvDO8T.uEK:user"
"gatus:$2a$12$OswG3sB8oDaB.KpawKM3P.78dID.Tj/0y5qeVD5BE6EH5bpGKe.na:user"
];
auth-access = [
"borgmatic:backups:wo"
"gatus:services:wo"
]; ];
auth-access = [ "borgmatic:backups:wo" ];
}; };
}; };
@ -48,4 +57,6 @@ in
} }
''; '';
}; };
age.secrets.ntfy.file = ../../../secrets/ntfy.age;
} }

View file

@ -30,6 +30,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -32,6 +32,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -24,6 +24,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -27,6 +27,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -26,6 +26,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -41,6 +41,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -26,6 +26,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -31,6 +31,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -26,6 +26,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -69,6 +69,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -36,6 +36,7 @@ in
"[CONNECTED] == true" "[CONNECTED] == true"
"[RESPONSE_TIME] < 500" "[RESPONSE_TIME] < 500"
]; ];
alerts = [ { type = "ntfy"; } ];
} }
]; ];

View file

@ -10,6 +10,21 @@ in
enable = true; enable = true;
}; };
gatus.settings.endpoints = [
{
name = "feature";
group = "";
inherit url;
interval = "5m";
conditions = [
"[STATUS] == 200"
"[CONNECTED] == true"
"[RESPONSE_TIME] < 500"
];
alerts = [ { type = "ntfy"; } ];
}
];
# borgmatic.settings = { # borgmatic.settings = {
# source_directories = [ ]; # source_directories = [ ];
# postgresql_databases = [ # postgresql_databases = [

10
secrets/gatus.age Normal file
View file

@ -0,0 +1,10 @@
age-encryption.org/v1
-> ssh-ed25519 qLT+DQ 3vJV+PZ1IvwiFPplPEwXkaZK4y0QLxkvi/stzAV+HWg
3htQOBS3ph9+OXG2ZYtMyzErGtYRP1vzycua+vhPX+4
-> ssh-ed25519 NanIwQ 748IDG9uT6jMj0CSU3EeBqRd7lZ7NTJoUldo4FUfkFI
bYaXhcXjYgKqEaUeRZQhx9neK1pDVN3QbhblLOcGUg0
-> ssh-ed25519 LtK9yQ au/UGPL91M0sUzMeOKPOkltXWDPoWeCrUWrD2OIsJA0
thILTQH9hrcBYBbRSZaHMODAhCKWsqomDuEK4hcKAqM
--- UpA2kIfSBwfgMxjt2x61KFAiUaV3sHQ6Gp2R87cvnwo
*D2Ä7Êpƒ梔 °p·ï¥·Q
Fuf°ýïpÚ°4±ÉQ<C389>5ÀµËѨeÿéÓªã <0B>Þˆá;šê“z8ýi{@ÛÇ—›

9
secrets/ntfy.age Normal file
View file

@ -0,0 +1,9 @@
age-encryption.org/v1
-> ssh-ed25519 qLT+DQ jySlchGAPxdkjpZzg+5BLH7O5yM+O5a9CleBVMqbck8
I5OEMjXJNrNKIBumXmiAMXRa1AZx0cKQ0BfM7HYCcRc
-> ssh-ed25519 NanIwQ 29upo2jTQF8Vz91yWmYCXnQW4LgYcvt1TcF/HLA5klA
eQla3EMQnRPzhd5MyDL3byPhIiio0rFFM+yesPLEtv8
-> ssh-ed25519 LtK9yQ Vx/lQ6M/wYa9483YpuCwwobNuIZjv/Sy9vl695H05BQ
qqUWRnrMYfflhcznrF2QKfODDa7vmz6Uy7fk1zSpbEE
--- xunznREPjjEVRWAmqI/4xKp/NrNk6C3B1Z+3Vjf2TL4
ˆÔm³{­œšïž¾²úz\ÀÂ,TºSS7T<0E>¤k«)úhçÙ—V—X´¶²€—¢0m»N?=ÓŸx TdÄY0²[)Û“SZš¸Ùñ:û><3E>FUÖ™~

View file

@ -19,6 +19,7 @@ in
"borgmatic-pg.age".publicKeys = users; "borgmatic-pg.age".publicKeys = users;
"borgmatic.age".publicKeys = users; "borgmatic.age".publicKeys = users;
"copyparty.age".publicKeys = users; "copyparty.age".publicKeys = users;
"gatus.age".publicKeys = users;
"git_signing_key.age".publicKeys = users; "git_signing_key.age".publicKeys = users;
"git_signing_key.pub.age".publicKeys = users; "git_signing_key.pub.age".publicKeys = users;
"immich.age".publicKeys = users; "immich.age".publicKeys = users;
@ -27,6 +28,7 @@ in
"kavita.age".publicKeys = users; "kavita.age".publicKeys = users;
"lidarr.age".publicKeys = users; "lidarr.age".publicKeys = users;
"miniflux-creds.age".publicKeys = users; "miniflux-creds.age".publicKeys = users;
"ntfy.age".publicKeys = users;
"nzbget.age".publicKeys = users; "nzbget.age".publicKeys = users;
"paperless.age".publicKeys = users; "paperless.age".publicKeys = users;
"porkbun-api.age".publicKeys = users; "porkbun-api.age".publicKeys = users;