infrastructure/modules/infrastructure/healthchecksio.tf

63 lines
1.2 KiB
Terraform
Raw Normal View History

data "healthchecksio_channel" "email" {
kind = "email"
}
data "healthchecksio_channel" "signal" {
kind = "signal"
}
data "healthchecksio_channel" "ntfy" {
kind = "ntfy"
}
resource "healthchecksio_check" "backup" {
for_each = var.hosts
name = "backup@${each.value.hostname}"
desc = "A check for the backup on ${each.value.hostname}"
tags = [
"backup",
each.value.hostname,
]
channels = [
data.healthchecksio_channel.email.id,
data.healthchecksio_channel.signal.id,
data.healthchecksio_channel.ntfy.id,
]
timeout = 86400
grace = 1800
}
resource "healthchecksio_check" "healthcheck" {
2024-10-07 20:28:23 +00:00
for_each = toset(["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
}
2024-10-07 01:29:20 +00:00
resource "healthchecksio_check" "status" {
name = "status.serguzim.me"
desc = "Monitoring for the status service"
channels = [
data.healthchecksio_channel.email.id,
data.healthchecksio_channel.signal.id,
data.healthchecksio_channel.ntfy.id,
]
timeout = 300
grace = 600
}