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 = {
web.port = 4242;
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].maintenance == false"
"[BODY].needsDbUpgrade == false"
(maxResponseTime 750)
(maxResponseTime 1000)
];
}
{
@ -184,4 +184,9 @@ let
}
];
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.")
];
TXT = [
(with spf; soft [ "include:spf.glasnet.nl" ])
];
subdomains = {
"*" = {
A = [ cfg.public.ipv4.router ];
@ -60,17 +64,17 @@ in
AAAA = [ cfg.dmz.ipv6.router ];
};
#for SMTP2GO to be able send emails from kun.is domain
#for SMTP2GO to be able send emails from kun.is domain
em670271 = {
CNAME = ["return.smtp2go.net."];
CNAME = [ "return.smtp2go.net." ];
};
"s670271._domainkey" = {
CNAME = ["dkim.smtp2go.net."];
CNAME = [ "dkim.smtp2go.net." ];
};
link = {
CNAME = ["track.smtp2go.net."];
CNAME = [ "track.smtp2go.net." ];
};
};