mirror of https://github.com/ceph/ceph-ansible.git
mgr/dashboard: Fix grafana/prometheus url config
When configuring grafana/prometheus embed in the mgr/dashboard, we need
to use the address of the grafana-server node and not the current
hostname because mgr/dashboard and grafana/prometheus could be present
on different hosts.
We should instead rely on the grafana_server_addr variable and remove
the dashboard_url.
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 4c6ec1dccb
)
pull/4318/merge
parent
f9d9ffac8f
commit
d4348da7a1
|
@ -704,7 +704,6 @@ dummy:
|
||||||
# Choose http or https
|
# Choose http or https
|
||||||
# For https, you should set dashboard.crt/key and grafana.crt/key
|
# For https, you should set dashboard.crt/key and grafana.crt/key
|
||||||
#dashboard_protocol: http
|
#dashboard_protocol: http
|
||||||
#dashboard_url: "{{ ansible_hostname }}"
|
|
||||||
#dashboard_port: 8443
|
#dashboard_port: 8443
|
||||||
#dashboard_admin_user: admin
|
#dashboard_admin_user: admin
|
||||||
#dashboard_admin_password: admin
|
#dashboard_admin_password: admin
|
||||||
|
|
|
@ -704,7 +704,6 @@ ceph_docker_registry: "registry.access.redhat.com"
|
||||||
# Choose http or https
|
# Choose http or https
|
||||||
# For https, you should set dashboard.crt/key and grafana.crt/key
|
# For https, you should set dashboard.crt/key and grafana.crt/key
|
||||||
#dashboard_protocol: http
|
#dashboard_protocol: http
|
||||||
#dashboard_url: "{{ ansible_hostname }}"
|
|
||||||
#dashboard_port: 8443
|
#dashboard_port: 8443
|
||||||
#dashboard_admin_user: admin
|
#dashboard_admin_user: admin
|
||||||
#dashboard_admin_password: admin
|
#dashboard_admin_password: admin
|
||||||
|
|
|
@ -97,13 +97,13 @@
|
||||||
until: ac_result.rc == 0
|
until: ac_result.rc == 0
|
||||||
|
|
||||||
- name: set grafana url
|
- name: set grafana url
|
||||||
command: "{{ container_exec_cmd }} ceph dashboard set-grafana-api-url {{ dashboard_protocol }}://{{ dashboard_url }}:{{ grafana_port }}/"
|
command: "{{ container_exec_cmd }} ceph dashboard set-grafana-api-url {{ dashboard_protocol }}://{{ grafana_server_addr }}:{{ grafana_port }}/"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: set alertmanager host
|
- name: set alertmanager host
|
||||||
command: "{{ container_exec_cmd }} ceph dashboard set-alertmanager-api-host {{ dashboard_protocol }}://{{ dashboard_url }}:{{ alertmanager_port }}/"
|
command: "{{ container_exec_cmd }} ceph dashboard set-alertmanager-api-host {{ dashboard_protocol }}://{{ grafana_server_addr }}:{{ alertmanager_port }}/"
|
||||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
|
@ -696,7 +696,6 @@ dashboard_enabled: True
|
||||||
# Choose http or https
|
# Choose http or https
|
||||||
# For https, you should set dashboard.crt/key and grafana.crt/key
|
# For https, you should set dashboard.crt/key and grafana.crt/key
|
||||||
dashboard_protocol: http
|
dashboard_protocol: http
|
||||||
dashboard_url: "{{ ansible_hostname }}"
|
|
||||||
dashboard_port: 8443
|
dashboard_port: 8443
|
||||||
dashboard_admin_user: admin
|
dashboard_admin_user: admin
|
||||||
dashboard_admin_password: admin
|
dashboard_admin_password: admin
|
||||||
|
|
Loading…
Reference in New Issue