mirror of https://github.com/ceph/ceph-ansible.git
Add http_addr option to grafana config
We have no reason to make grafana container
listen on *:<port>, so this change adds the
http_addr option to the grafana config file
and adds the related option on the wait_for
tasks.
Since grafana_server_addr should exists, we
shouldn't rely on the _current_monitor_addr
default on prometheus/grafana templates.
This change also remove this default value
that is not necessary anymore.
Signed-off-by: fmount <fpantano@redhat.com>
(cherry picked from commit 8a666bfd15
)
pull/4420/head
parent
ab67c6bd76
commit
159db72269
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
- name: wait for grafana to be stopped
|
- name: wait for grafana to be stopped
|
||||||
wait_for:
|
wait_for:
|
||||||
|
host: '{{ grafana_server_addr }}'
|
||||||
port: '{{ grafana_port }}'
|
port: '{{ grafana_port }}'
|
||||||
state: stopped
|
state: stopped
|
||||||
|
|
||||||
|
@ -97,4 +98,5 @@
|
||||||
|
|
||||||
- name: wait for grafana to start
|
- name: wait for grafana to start
|
||||||
wait_for:
|
wait_for:
|
||||||
|
host: '{{ grafana_server_addr }}'
|
||||||
port: '{{ grafana_port }}'
|
port: '{{ grafana_port }}'
|
||||||
|
|
|
@ -17,7 +17,7 @@ datasources:
|
||||||
# <int> org id. will default to orgId 1 if not specified
|
# <int> org id. will default to orgId 1 if not specified
|
||||||
orgId: 1
|
orgId: 1
|
||||||
# <string> url
|
# <string> url
|
||||||
url: 'http://{{ grafana_server_addr | default(_current_monitor_address) }}:{{ prometheus_port }}'
|
url: 'http://{{ grafana_server_addr }}:{{ prometheus_port }}'
|
||||||
# <bool> enable/disable basic auth
|
# <bool> enable/disable basic auth
|
||||||
basicAuth: false
|
basicAuth: false
|
||||||
# <bool> mark as default datasource. Max one per org
|
# <bool> mark as default datasource. Max one per org
|
||||||
|
|
|
@ -21,6 +21,7 @@ cert_key = /etc/grafana/ceph-dashboard.key
|
||||||
domain = {{ ansible_fqdn }}
|
domain = {{ ansible_fqdn }}
|
||||||
protocol = {{ dashboard_protocol }}
|
protocol = {{ dashboard_protocol }}
|
||||||
http_port = {{ grafana_port }}
|
http_port = {{ grafana_port }}
|
||||||
|
http_addr = {{ grafana_server_addr }}
|
||||||
|
|
||||||
[security]
|
[security]
|
||||||
admin_user = {{ grafana_admin_user }}
|
admin_user = {{ grafana_admin_user }}
|
||||||
|
|
|
@ -52,4 +52,4 @@ alerting:
|
||||||
alertmanagers:
|
alertmanagers:
|
||||||
- scheme: http
|
- scheme: http
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['{{ grafana_server_addr | default(_current_monitor_address) }}:{{ alertmanager_port }}']
|
- targets: ['{{ grafana_server_addr }}:{{ alertmanager_port }}']
|
||||||
|
|
Loading…
Reference in New Issue