Fix gatus threshold for backups and add domains to service emails

This commit is contained in:
Tobias Reisinger 2026-02-01 01:44:34 +01:00
parent a007ba8a33
commit 731647be9d
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
3 changed files with 22 additions and 15 deletions

View file

@ -6,9 +6,9 @@ resource "random_password" "mailcow_service_passwords" {
resource "mailcow_mailbox" "services" {
for_each = local.services_mail
domain = "serguzim.me"
full_name = each.value.mail
local_part = each.value.mail
domain = split("@", each.value.mail)[1]
full_name = split("@", each.value.mail)[0]
local_part = split("@", each.value.mail)[0]
password = random_password.mailcow_service_passwords[each.key].result
force_pw_update = false
smtp_access = each.value.mail_smtp

View file

@ -33,6 +33,13 @@ class FilterModule(object):
def vault_hosts_backup_to_gatus(self, hostvars):
result = []
backup_alerts = []
for a in self.default_alerts:
backup_alerts.append(dict(a, **{
'failure-threshold': 1,
'success-threshold': 1
}))
for name, host_data in hostvars.items():
if not host_data.get("host_backup_gatus_token"):
continue
@ -40,7 +47,7 @@ class FilterModule(object):
"name": f"backup@{name}",
"group": "8-backups",
"token": host_data["host_backup_gatus_token"],
"alerts": self.default_alerts,
"alerts": backup_alerts,
})
return result

View file

@ -46,7 +46,7 @@ services = {
certificates = ["auth.serguzim.me"]
auth = false
database = true
mail = "auth"
mail = "auth@serguzim.me"
},
"backup" = {
@ -126,7 +126,7 @@ services = {
}]
auth = false
database = false
mail = "dmarcreports"
mail = "dmarcreports@serguzim.me"
mail_smtp = false
mail_imap = true
}
@ -251,7 +251,7 @@ services = {
auth_redirects = ["https://git.serguzim.me/user/oauth2/auth.serguzim.me/callback"]
database = true
s3 = "external"
mail = "git"
mail = "git@serguzim.me"
},
"forgejo_runner" = {
@ -280,7 +280,7 @@ services = {
}]
auth = false
database = false
mail = "status"
mail = "status@serguzim.me"
},
"homebox" = {
@ -302,7 +302,7 @@ services = {
}
auth = false
database = false
mail = "inventory"
mail = "inventory@serguzim.me"
},
"immich" = {
@ -504,7 +504,7 @@ services = {
database = true
s3 = "external"
s3_buckets = ["mimir_blocks", "mimir_alertmanager", "mimir_ruler"]
mail = "monitoring"
mail = "monitoring@serguzim.me"
}
"loki" = {
@ -624,7 +624,7 @@ services = {
auth = false
database = true
storage_box = true
mail = "documents"
mail = "documents@serguzim.me"
},
"postgresql" = {
@ -735,7 +735,7 @@ services = {
auth = true
auth_redirects = ["https://matrix.serguzim.me/_synapse/client/oidc/callback"]
database = true
mail = "matrix"
mail = "matrix@serguzim.me"
},
"tandoor" = {
@ -838,14 +838,14 @@ services = {
auth = true
auth_redirects = ["https://todo.serguzim.me/auth/openid/authserguzimme"]
database = true
mail = "todo"
mail = "todo@serguzim.me"
},
"watchtower" = {
host = "*"
auth = false
database = false
mail = "watchtower"
mail = "watchtower@serguzim.me"
},
"webdis" = {
@ -872,7 +872,7 @@ services = {
auth = true
auth_redirects = ["https://wiki.serguzim.me/login/f792bc7d-1a25-4437-944e-55eaf0111102/callback"]
database = true
mail = "wiki"
mail = "wiki@serguzim.me"
},
"woodpecker" = {