Commit 159db722 authored by fmount's avatar fmount Committed by Dimitri Savineau
Browse files

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: default avatarfmount <fpantano@redhat.com>
(cherry picked from commit 8a666bfd)
parent ab67c6bd
......@@ -17,6 +17,7 @@
- name: wait for grafana to be stopped
wait_for:
host: '{{ grafana_server_addr }}'
port: '{{ grafana_port }}'
state: stopped
......@@ -97,4 +98,5 @@
- name: wait for grafana to start
wait_for:
host: '{{ grafana_server_addr }}'
port: '{{ grafana_port }}'
......@@ -17,7 +17,7 @@ datasources:
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <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
basicAuth: false
# <bool> mark as default datasource. Max one per org
......
......@@ -21,6 +21,7 @@ cert_key = /etc/grafana/ceph-dashboard.key
domain = {{ ansible_fqdn }}
protocol = {{ dashboard_protocol }}
http_port = {{ grafana_port }}
http_addr = {{ grafana_server_addr }}
[security]
admin_user = {{ grafana_admin_user }}
......
......@@ -52,4 +52,4 @@ alerting:
alertmanagers:
- scheme: http
static_configs:
- targets: ['{{ grafana_server_addr | default(_current_monitor_address) }}:{{ alertmanager_port }}']
- targets: ['{{ grafana_server_addr }}:{{ alertmanager_port }}']
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment