Fix gatus threshold for backups and add domains to service emails
This commit is contained in:
parent
a007ba8a33
commit
731647be9d
3 changed files with 22 additions and 15 deletions
|
|
@ -6,9 +6,9 @@ resource "random_password" "mailcow_service_passwords" {
|
||||||
|
|
||||||
resource "mailcow_mailbox" "services" {
|
resource "mailcow_mailbox" "services" {
|
||||||
for_each = local.services_mail
|
for_each = local.services_mail
|
||||||
domain = "serguzim.me"
|
domain = split("@", each.value.mail)[1]
|
||||||
full_name = each.value.mail
|
full_name = split("@", each.value.mail)[0]
|
||||||
local_part = each.value.mail
|
local_part = split("@", each.value.mail)[0]
|
||||||
password = random_password.mailcow_service_passwords[each.key].result
|
password = random_password.mailcow_service_passwords[each.key].result
|
||||||
force_pw_update = false
|
force_pw_update = false
|
||||||
smtp_access = each.value.mail_smtp
|
smtp_access = each.value.mail_smtp
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,13 @@ class FilterModule(object):
|
||||||
|
|
||||||
def vault_hosts_backup_to_gatus(self, hostvars):
|
def vault_hosts_backup_to_gatus(self, hostvars):
|
||||||
result = []
|
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():
|
for name, host_data in hostvars.items():
|
||||||
if not host_data.get("host_backup_gatus_token"):
|
if not host_data.get("host_backup_gatus_token"):
|
||||||
continue
|
continue
|
||||||
|
|
@ -40,7 +47,7 @@ class FilterModule(object):
|
||||||
"name": f"backup@{name}",
|
"name": f"backup@{name}",
|
||||||
"group": "8-backups",
|
"group": "8-backups",
|
||||||
"token": host_data["host_backup_gatus_token"],
|
"token": host_data["host_backup_gatus_token"],
|
||||||
"alerts": self.default_alerts,
|
"alerts": backup_alerts,
|
||||||
})
|
})
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ services = {
|
||||||
certificates = ["auth.serguzim.me"]
|
certificates = ["auth.serguzim.me"]
|
||||||
auth = false
|
auth = false
|
||||||
database = true
|
database = true
|
||||||
mail = "auth"
|
mail = "auth@serguzim.me"
|
||||||
},
|
},
|
||||||
|
|
||||||
"backup" = {
|
"backup" = {
|
||||||
|
|
@ -126,7 +126,7 @@ services = {
|
||||||
}]
|
}]
|
||||||
auth = false
|
auth = false
|
||||||
database = false
|
database = false
|
||||||
mail = "dmarcreports"
|
mail = "dmarcreports@serguzim.me"
|
||||||
mail_smtp = false
|
mail_smtp = false
|
||||||
mail_imap = true
|
mail_imap = true
|
||||||
}
|
}
|
||||||
|
|
@ -251,7 +251,7 @@ services = {
|
||||||
auth_redirects = ["https://git.serguzim.me/user/oauth2/auth.serguzim.me/callback"]
|
auth_redirects = ["https://git.serguzim.me/user/oauth2/auth.serguzim.me/callback"]
|
||||||
database = true
|
database = true
|
||||||
s3 = "external"
|
s3 = "external"
|
||||||
mail = "git"
|
mail = "git@serguzim.me"
|
||||||
},
|
},
|
||||||
|
|
||||||
"forgejo_runner" = {
|
"forgejo_runner" = {
|
||||||
|
|
@ -280,7 +280,7 @@ services = {
|
||||||
}]
|
}]
|
||||||
auth = false
|
auth = false
|
||||||
database = false
|
database = false
|
||||||
mail = "status"
|
mail = "status@serguzim.me"
|
||||||
},
|
},
|
||||||
|
|
||||||
"homebox" = {
|
"homebox" = {
|
||||||
|
|
@ -302,7 +302,7 @@ services = {
|
||||||
}
|
}
|
||||||
auth = false
|
auth = false
|
||||||
database = false
|
database = false
|
||||||
mail = "inventory"
|
mail = "inventory@serguzim.me"
|
||||||
},
|
},
|
||||||
|
|
||||||
"immich" = {
|
"immich" = {
|
||||||
|
|
@ -504,7 +504,7 @@ services = {
|
||||||
database = true
|
database = true
|
||||||
s3 = "external"
|
s3 = "external"
|
||||||
s3_buckets = ["mimir_blocks", "mimir_alertmanager", "mimir_ruler"]
|
s3_buckets = ["mimir_blocks", "mimir_alertmanager", "mimir_ruler"]
|
||||||
mail = "monitoring"
|
mail = "monitoring@serguzim.me"
|
||||||
}
|
}
|
||||||
|
|
||||||
"loki" = {
|
"loki" = {
|
||||||
|
|
@ -624,7 +624,7 @@ services = {
|
||||||
auth = false
|
auth = false
|
||||||
database = true
|
database = true
|
||||||
storage_box = true
|
storage_box = true
|
||||||
mail = "documents"
|
mail = "documents@serguzim.me"
|
||||||
},
|
},
|
||||||
|
|
||||||
"postgresql" = {
|
"postgresql" = {
|
||||||
|
|
@ -735,7 +735,7 @@ services = {
|
||||||
auth = true
|
auth = true
|
||||||
auth_redirects = ["https://matrix.serguzim.me/_synapse/client/oidc/callback"]
|
auth_redirects = ["https://matrix.serguzim.me/_synapse/client/oidc/callback"]
|
||||||
database = true
|
database = true
|
||||||
mail = "matrix"
|
mail = "matrix@serguzim.me"
|
||||||
},
|
},
|
||||||
|
|
||||||
"tandoor" = {
|
"tandoor" = {
|
||||||
|
|
@ -838,14 +838,14 @@ services = {
|
||||||
auth = true
|
auth = true
|
||||||
auth_redirects = ["https://todo.serguzim.me/auth/openid/authserguzimme"]
|
auth_redirects = ["https://todo.serguzim.me/auth/openid/authserguzimme"]
|
||||||
database = true
|
database = true
|
||||||
mail = "todo"
|
mail = "todo@serguzim.me"
|
||||||
},
|
},
|
||||||
|
|
||||||
"watchtower" = {
|
"watchtower" = {
|
||||||
host = "*"
|
host = "*"
|
||||||
auth = false
|
auth = false
|
||||||
database = false
|
database = false
|
||||||
mail = "watchtower"
|
mail = "watchtower@serguzim.me"
|
||||||
},
|
},
|
||||||
|
|
||||||
"webdis" = {
|
"webdis" = {
|
||||||
|
|
@ -872,7 +872,7 @@ services = {
|
||||||
auth = true
|
auth = true
|
||||||
auth_redirects = ["https://wiki.serguzim.me/login/f792bc7d-1a25-4437-944e-55eaf0111102/callback"]
|
auth_redirects = ["https://wiki.serguzim.me/login/f792bc7d-1a25-4437-944e-55eaf0111102/callback"]
|
||||||
database = true
|
database = true
|
||||||
mail = "wiki"
|
mail = "wiki@serguzim.me"
|
||||||
},
|
},
|
||||||
|
|
||||||
"woodpecker" = {
|
"woodpecker" = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue