Add healthcheck pings to opentofu and add systemd cleanup to healthcheck

This commit is contained in:
Tobias Reisinger 2024-10-06 20:47:59 +02:00
parent 2ad3cce749
commit a15e70d73d
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
7 changed files with 60 additions and 11 deletions
modules/infrastructure

View file

@ -30,3 +30,19 @@ resource "healthchecksio_check" "backup" {
timeout = 86400
grace = 1800
}
resource "healthchecksio_check" "healthcheck" {
for_each = toset(["http", "mail", "matrix"])
name = "service: ${each.value}"
desc = "Monitoring for service (group) ${each.value}"
channels = [
data.healthchecksio_channel.email.id,
data.healthchecksio_channel.signal.id,
data.healthchecksio_channel.ntfy.id,
]
timeout = 300
grace = 600
}

View file

@ -34,6 +34,12 @@ output "healthchecksio" {
"ping_url" = check.ping_url
}
}
healthcheck = {
for key, check in healthchecksio_check.healthcheck : key => {
"id" = check.id
"ping_url" = check.ping_url
}
}
}
}