2024-10-06 15:08:25 +00:00
|
|
|
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
|
|
|
|
}
|
2024-10-06 18:47:59 +00:00
|
|
|
|
|
|
|
resource "healthchecksio_check" "healthcheck" {
|
2024-10-07 20:28:23 +00:00
|
|
|
for_each = toset(["mail", "matrix"])
|
2024-10-06 18:47:59 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|