Add health check for unifi

This commit is contained in:
Daniel Berteaud 2024-01-09 09:15:48 +01:00
parent a88e2188cf
commit 3c7ec4e32d
3 changed files with 25 additions and 1 deletions

View File

@ -1,4 +1,4 @@
FROM danielberteaud/alpine:24.1-1
FROM danielberteaud/alpine:24.1-2
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
ENV UBNT_UPDATE_API="https://fw-update.ubnt.com/api/firmware-latest?filter=eq~~product~~unifi-firmware&filter=eq~~channel~~release" \

View File

@ -28,6 +28,18 @@ job "unifi" {
}
check {
type = "http"
path = "/status"
expose = true
interval = "10s"
timeout = "5s"
check_restart {
limit = 12
grace = "2m"
}
}
tags = [
"traefik.enable=true",

View File

@ -19,6 +19,18 @@ job [[ .unifi.instance | toJSON ]] {
[[ template "common/connect" $c ]]
check {
type = "http"
path = "/status"
expose = true
interval = "10s"
timeout = "5s"
check_restart {
limit = 12
grace = "2m"
}
}
tags = [
"[[ $c.traefik.instance ]].enable=true",