Force / as route prefix for prometheus and alertmanager

This commit is contained in:
Daniel Berteaud 2024-03-26 15:35:02 +01:00
parent e01febeb09
commit f3eb01914b
3 changed files with 4 additions and 0 deletions

View File

@ -186,6 +186,7 @@ _EOT
"--web.console.libraries=/opt/prometheus/console_libraries",
"--web.console.templates=/opt/prometheus/consoles",
"--web.external-url=https://prometheus.example.org",
"--web.route-prefix=/"
]
}
@ -1661,6 +1662,7 @@ exec alertmanager \
--config.file=/secrets/alertmanager.yml \
--storage.path=/data \
--web.external-url=https://alert.example.org \
--web.route-prefix=/ \
--web.listen-address=0.0.0.0:{{ env "NOMAD_ALLOC_PORT_web-tls" }} \
--cluster.listen-address=0.0.0.0:{{ env "NOMAD_ALLOC_PORT_cluster" }} \
--cluster.advertise-address={{ env "NOMAD_HOST_ADDR_cluster" }} \

View File

@ -62,6 +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=/"
]
}

View File

@ -6,6 +6,7 @@ exec alertmanager \
--config.file=/secrets/alertmanager.yml \
--storage.path=/data \
--web.external-url=[[ .public_url ]] \
--web.route-prefix=/ \
--web.listen-address=0.0.0.0:{{ env "NOMAD_ALLOC_PORT_web-tls" }} \
--cluster.listen-address=0.0.0.0:{{ env "NOMAD_ALLOC_PORT_cluster" }} \
--cluster.advertise-address={{ env "NOMAD_HOST_ADDR_cluster" }} \