Remove gatus group (use host)

This commit is contained in:
Tobias Reisinger 2026-10-25 23:13:10 +01:00
commit 417a7e2aa3
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
4 changed files with 5 additions and 43 deletions

View file

@ -9,7 +9,7 @@ gatus_federation_tester: "https://federationtester.matrix.org/api/report?server_
gatus_endpoints_other: gatus_endpoints_other:
- name: matrix-federation - name: matrix-federation
url: "{{ gatus_federation_tester }}" url: "{{ gatus_federation_tester }}"
group: 9-external group: external
interval: 5m interval: 5m
conditions: conditions:
- '[STATUS] == 200' - '[STATUS] == 200'
@ -23,7 +23,7 @@ gatus_endpoints_other:
send-on-resolved: true send-on-resolved: true
- name: healthchecks-io - name: healthchecks-io
url: "{{ opentofu.healthchecksio.status.ping_url }}" url: "{{ opentofu.healthchecksio.status.ping_url }}"
group: 9-external group: external
interval: 5m interval: 5m
conditions: conditions:
- '[STATUS] == 200' - '[STATUS] == 200'

View file

@ -23,7 +23,7 @@ class FilterModule(object):
result.append({ result.append({
"name": host["hostname"], "name": host["hostname"],
"url": f"icmp://{host['fqdn']}", "url": f"icmp://{host['fqdn']}",
"group": "1-hosts", "group": host["hostname"],
"conditions": [ "conditions": [
"[CONNECTED] == true", "[CONNECTED] == true",
], ],
@ -45,7 +45,7 @@ class FilterModule(object):
continue continue
result.append({ result.append({
"name": f"backup@{name}", "name": f"backup@{name}",
"group": "8-backups", "group": name,
"token": host_data["host_backup_gatus_token"], "token": host_data["host_backup_gatus_token"],
"alerts": backup_alerts, "alerts": backup_alerts,
}) })
@ -85,7 +85,7 @@ class FilterModule(object):
new_endpoint = { new_endpoint = {
"name": name, "name": name,
"group": mon.get("group"), "group": service.get("host"),
"url": url, "url": url,
"conditions": conditions, "conditions": conditions,
"interval": mon.get("interval"), "interval": mon.get("interval"),

View file

@ -1,11 +1,3 @@
# Groups:
## 1-hosts
## 3-services
## 4-websites
## 7-support
## 8-backup
## 9-external
services = { services = {
"acme_dns" = { "acme_dns" = {
host = "node001" host = "node001"
@ -14,7 +6,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "/health" url = "/health"
group = "7-support"
} }
ports = [ ports = [
{ {
@ -47,7 +38,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "/-/health/live/" url = "/-/health/live/"
group = "3-services"
} }
certificates = [{ certificates = [{
domain = "auth.serguzim.me" domain = "auth.serguzim.me"
@ -112,7 +102,6 @@ services = {
} }
] ]
monitoring = { monitoring = {
group = "3-services"
} }
auth = false auth = false
database = false database = false
@ -127,7 +116,6 @@ services = {
}, },
] ]
monitoring = { monitoring = {
group = "7-support"
} }
auth = false auth = false
database = false database = false
@ -174,7 +162,6 @@ services = {
path = "/var/lib/dokku" path = "/var/lib/dokku"
}] }]
monitoring = { monitoring = {
group = "7-support"
url = "https://serguzim.me/" url = "https://serguzim.me/"
} }
ports = [ ports = [
@ -223,7 +210,6 @@ services = {
# }] # }]
# monitoring = { # monitoring = {
# url = "https://multiplayer.factorio.com/get-game-details/91.107.211.57:34197" # url = "https://multiplayer.factorio.com/get-game-details/91.107.211.57:34197"
# group = "3-services"
# interval = "5m" # interval = "5m"
# conditions = [ # conditions = [
# "DEFAULT", # "DEFAULT",
@ -263,7 +249,6 @@ services = {
#}] #}]
monitoring = { monitoring = {
url = "/api/v1/version" url = "/api/v1/version"
group = "3-services"
} }
ports = [ ports = [
{ {
@ -331,7 +316,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "/api/v1/status" url = "/api/v1/status"
group = "3-services"
conditions = [ conditions = [
"DEFAULT", "DEFAULT",
"[BODY].health == true" "[BODY].health == true"
@ -358,7 +342,6 @@ services = {
} }
] ]
monitoring = { monitoring = {
group = "3-services"
} }
auth = false auth = false
auth_redirects = ["https://gallery.serguzim.me/auth/login"] auth_redirects = ["https://gallery.serguzim.me/auth/login"]
@ -369,7 +352,6 @@ services = {
"immich_worker" = { "immich_worker" = {
host = "node004" host = "node004"
monitoring = { monitoring = {
group = "7-support"
} }
auth = false auth = false
database = false database = false
@ -392,7 +374,6 @@ services = {
] ]
monitoring = { monitoring = {
url = "/health" url = "/health"
group = "3-services"
conditions = [ conditions = [
"DEFAULT", "DEFAULT",
"[BODY] == Healthy" "[BODY] == Healthy"
@ -416,7 +397,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "/" url = "/"
group = "3-services"
} }
auth = false auth = false
database = false database = false
@ -433,7 +413,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "starttls://mail.serguzim.me:587" url = "starttls://mail.serguzim.me:587"
group = "3-services"
conditions = [ conditions = [
"[CONNECTED] == true", "[CONNECTED] == true",
"[CERTIFICATE_EXPIRATION] > 48h" "[CERTIFICATE_EXPIRATION] > 48h"
@ -505,7 +484,6 @@ services = {
] ]
monitoring = { monitoring = {
url = "tcp://minecraft.serguzim.me:25565" url = "tcp://minecraft.serguzim.me:25565"
group = "3-services"
conditions = [ conditions = [
"[CONNECTED] == true" "[CONNECTED] == true"
] ]
@ -536,7 +514,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "/minio/health/live" url = "/minio/health/live"
group = "7-support"
} }
auth = false auth = false
auth_redirects = ["https://console.s3.serguzim.me/oauth_callback"] auth_redirects = ["https://console.s3.serguzim.me/oauth_callback"]
@ -557,7 +534,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "/v1/health" url = "/v1/health"
group = "3-services"
conditions = [ conditions = [
"DEFAULT", "DEFAULT",
"[BODY].healthy == true" "[BODY].healthy == true"
@ -580,7 +556,6 @@ services = {
} }
] ]
monitoring = { monitoring = {
group = "3-services"
} }
auth = false auth = false
database = true database = true
@ -634,7 +609,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "tcp://db.serguzim.me:5432" url = "tcp://db.serguzim.me:5432"
group = "7-support"
conditions = [ conditions = [
"[CONNECTED] == true" "[CONNECTED] == true"
] ]
@ -669,7 +643,6 @@ services = {
type = "docker" type = "docker"
}] }]
monitoring = { monitoring = {
group = "4-websites"
} }
auth = false auth = false
database = false database = false
@ -694,7 +667,6 @@ services = {
] ]
monitoring = { monitoring = {
url = "/rest/health" url = "/rest/health"
group = "3-services"
conditions = [ conditions = [
"DEFAULT", "DEFAULT",
"[BODY].status == pass" "[BODY].status == pass"
@ -725,7 +697,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "/_matrix/client/versions" url = "/_matrix/client/versions"
group = "3-services"
} }
ports = [ ports = [
{ {
@ -752,7 +723,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "/accounts/login/" url = "/accounts/login/"
group = "3-services"
} }
auth = false auth = false
database = true database = true
@ -770,7 +740,6 @@ services = {
type = "docker" type = "docker"
}] }]
monitoring = { monitoring = {
group = "7-support"
} }
ports = [ ports = [
{ {
@ -803,7 +772,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "/tt-rss/" url = "/tt-rss/"
group = "3-services"
} }
auth = false auth = false
database = true database = true
@ -816,7 +784,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "/api/heartbeat" url = "/api/heartbeat"
group = "3-services"
} }
auth = false auth = false
database = true database = true
@ -836,7 +803,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "/api/v1/info" url = "/api/v1/info"
group = "3-services"
} }
auth = true auth = true
auth_redirects = ["https://todo.serguzim.me/auth/openid/authserguzimme"] auth_redirects = ["https://todo.serguzim.me/auth/openid/authserguzimme"]
@ -858,7 +824,6 @@ services = {
}] }]
monitoring = { monitoring = {
url = "/info" url = "/info"
group = "3-services"
} }
auth = false auth = false
database = false database = false
@ -870,7 +835,6 @@ services = {
domain = "wiki.serguzim.me" domain = "wiki.serguzim.me"
}] }]
monitoring = { monitoring = {
group = "3-services"
} }
auth = true auth = true
auth_redirects = ["https://wiki.serguzim.me/login/f792bc7d-1a25-4437-944e-55eaf0111102/callback"] auth_redirects = ["https://wiki.serguzim.me/login/f792bc7d-1a25-4437-944e-55eaf0111102/callback"]
@ -896,7 +860,6 @@ services = {
#}] #}]
monitoring = { monitoring = {
url = "/healthz" url = "/healthz"
group = "3-services"
} }
auth = false auth = false
database = true database = true

View file

@ -144,7 +144,6 @@ variable "services" {
}))) })))
monitoring = optional(object({ monitoring = optional(object({
url = optional(string) url = optional(string)
group = optional(string)
interval = optional(string) interval = optional(string)
conditions = optional(list(string)) conditions = optional(list(string))
})) }))