Fix health endpoint for prometheus and alertmanager

This commit is contained in:
Daniel Berteaud 2024-03-26 14:51:45 +01:00
parent 46023974fb
commit 5d46db4a93
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ job "[[ .instance ]]-services" {
name = "health"
type = "http"
expose = true
path = "/-/healthy"
path = "[[ if eq "" (urlParse $c.public_url).Path ]]/[[ else ]][[ (urlParse $c.public_url).Path ]][[ end ]]-/healthy"
interval = "20s"
timeout = "8s"
check_restart {
@ -62,7 +62,7 @@ job "[[ .instance ]]-services" {
"--web.console.libraries=/opt/prometheus/console_libraries",
"--web.console.templates=/opt/prometheus/consoles",
"--web.external-url=[[ $c.public_url ]]",
"--web.route-prefix=[[ if eq "" (urlParse $c.public_url).Path ]]/[[ else ]](urlParse $c.public_url).Path[[ end ]]"
"--web.route-prefix=[[ if eq "" (urlParse $c.public_url).Path ]]/[[ else ]][[ (urlParse $c.public_url).Path ]][[ end ]]"
]
}
@ -209,7 +209,7 @@ _EOT
name = "health"
type = "http"
expose = true
path = "/-/healthy"
path = "[[ if eq "" (urlParse $c.public_url).Path ]]/[[ else ]][[ (urlParse $c.public_url).Path ]][[ end ]]-/healthy"
interval = "20s"
timeout = "8s"
check_restart {