From: Guillaume Abrioux Date: Mon, 2 Dec 2019 13:31:41 +0000 (+0100) Subject: dashboard: use fqdn url for active alert X-Git-Tag: v4.0.6~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ba2925df3291690e55259ebe188dd6ea8b659010;p=ceph-ansible.git dashboard: use fqdn url for active alert When using the shortname, the URL for active alert launches with short hostname and fails to connect to the server. This commit changes the template in order to use the fqdn. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1765485 Signed-off-by: Guillaume Abrioux (cherry picked from commit a8d76d72d71c8440003ac1ac78fd187f7b7a65e6) --- diff --git a/roles/ceph-prometheus/templates/alertmanager.yml.j2 b/roles/ceph-prometheus/templates/alertmanager.yml.j2 index 4408de0aa..c2600acec 100644 --- a/roles/ceph-prometheus/templates/alertmanager.yml.j2 +++ b/roles/ceph-prometheus/templates/alertmanager.yml.j2 @@ -11,5 +11,5 @@ receivers: - name: 'ceph-dashboard' webhook_configs: {% for host in groups['mgrs'] | default(groups['mons']) %} - - url: '{{ dashboard_protocol }}://{{ host }}:{{ dashboard_port }}/api/prometheus_receiver' + - url: '{{ dashboard_protocol }}://{{ hostvars[host]['ansible_fqdn'] }}:{{ dashboard_port }}/api/prometheus_receiver' {% endfor %}