62 lines
1.2 KiB
HCL
62 lines
1.2 KiB
HCL
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" {
|
|
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
|
|
}
|
|
|
|
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
|
|
}
|