enable email alerting in gatus

This commit is contained in:
Pim Kunis 2024-03-05 21:50:43 +01:00
parent 10bd58170b
commit d03be78a63
3 changed files with 29 additions and 6 deletions

View file

@ -58,6 +58,20 @@ in
settings = { settings = {
web.port = 4242; web.port = 4242;
endpoints = import ./gatus-endpoints.nix; endpoints = import ./gatus-endpoints.nix;
alerting.email = {
from = "gatus@kun.is";
host = "mail.smtp2go.com";
port = 2525;
to = "pim@kunis.nl";
client.insecure = true;
default-alert = {
enabled = true;
failure-threshold = 2;
success-threshold = 1;
send-on-resolved = true;
};
};
}; };
}; };
}; };

View file

@ -20,7 +20,7 @@ let
"[BODY].installed == true" "[BODY].installed == true"
"[BODY].maintenance == false" "[BODY].maintenance == false"
"[BODY].needsDbUpgrade == false" "[BODY].needsDbUpgrade == false"
(maxResponseTime 750) (maxResponseTime 1000)
]; ];
} }
{ {
@ -184,4 +184,9 @@ let
} }
]; ];
in in
map (endpoint: endpoint // { interval = "5m"; }) endpoints map
(endpoint: endpoint // {
interval = "5m";
alerts = [{ type = "email"; }];
})
endpoints

View file

@ -21,6 +21,10 @@ in
(mx.mx 10 "mail.kun.is.") (mx.mx 10 "mail.kun.is.")
]; ];
TXT = [
(with spf; soft [ "include:spf.glasnet.nl" ])
];
subdomains = { subdomains = {
"*" = { "*" = {
A = [ cfg.public.ipv4.router ]; A = [ cfg.public.ipv4.router ];