]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
dashboard: use fqdn url for active alert
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 2 Dec 2019 13:31:41 +0000 (14:31 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 3 Dec 2019 13:30:32 +0000 (14:30 +0100)
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 <gabrioux@redhat.com>
roles/ceph-prometheus/templates/alertmanager.yml.j2

index 4408de0aa213b6620a500735be882ad910a419ef..c2600acec42529542e78d87c756f826379132376 100644 (file)
@@ -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 %}