dashboard: use fqdn in external url

Force fqdn to be used in external url for prometheus and alertmanager.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1765485

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 498bc45859)
pull/4900/head
Guillaume Abrioux 2020-01-02 18:09:38 +01:00 committed by Dimitri Savineau
parent d625cefbac
commit 3caba2c31c
2 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=alertmanager \
{{ alertmanager_container_image }} \ {{ alertmanager_container_image }} \
--config.file=/etc/alertmanager/alertmanager.yml \ --config.file=/etc/alertmanager/alertmanager.yml \
--storage.path=/alertmanager \ --storage.path=/alertmanager \
--web.external-url=http://{{ ansible_fqdn }}:{{ alertmanager_port }}/ \
--web.listen-address=:{{ alertmanager_port }} --web.listen-address=:{{ alertmanager_port }}
ExecStop=/usr/bin/{{ container_binary }} stop alertmanager ExecStop=/usr/bin/{{ container_binary }} stop alertmanager
Restart=always Restart=always

View File

@ -23,7 +23,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=prometheus \
{{ prometheus_container_image }} \ {{ prometheus_container_image }} \
--config.file=/etc/prometheus/prometheus.yml \ --config.file=/etc/prometheus/prometheus.yml \
--storage.tsdb.path=/prometheus \ --storage.tsdb.path=/prometheus \
--web.external-url=http://{{ inventory_hostname }}:{{ prometheus_port }}/ \ --web.external-url=http://{{ ansible_fqdn }}:{{ prometheus_port }}/ \
--web.listen-address=:{{ prometheus_port }} --web.listen-address=:{{ prometheus_port }}
ExecStop=/usr/bin/{{ container_binary }} stop prometheus ExecStop=/usr/bin/{{ container_binary }} stop prometheus
Restart=always Restart=always