diff --git a/roles/ceph-prometheus/templates/alertmanager.service.j2 b/roles/ceph-prometheus/templates/alertmanager.service.j2 index 6e3b33eb3..64b264e0b 100644 --- a/roles/ceph-prometheus/templates/alertmanager.service.j2 +++ b/roles/ceph-prometheus/templates/alertmanager.service.j2 @@ -23,6 +23,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=alertmanager \ {{ alertmanager_container_image }} \ --config.file=/etc/alertmanager/alertmanager.yml \ --storage.path=/alertmanager \ + --web.external-url=http://{{ ansible_fqdn }}:{{ alertmanager_port }}/ \ --web.listen-address=:{{ alertmanager_port }} ExecStop=/usr/bin/{{ container_binary }} stop alertmanager Restart=always diff --git a/roles/ceph-prometheus/templates/prometheus.service.j2 b/roles/ceph-prometheus/templates/prometheus.service.j2 index 919090815..bbaed8829 100644 --- a/roles/ceph-prometheus/templates/prometheus.service.j2 +++ b/roles/ceph-prometheus/templates/prometheus.service.j2 @@ -23,7 +23,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=prometheus \ {{ prometheus_container_image }} \ --config.file=/etc/prometheus/prometheus.yml \ --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 }} ExecStop=/usr/bin/{{ container_binary }} stop prometheus Restart=always