Add healthcheck pings to opentofu and add systemd cleanup to healthcheck
This commit is contained in:
parent
2ad3cce749
commit
a15e70d73d
7 changed files with 60 additions and 11 deletions
modules/infrastructure
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue