1
0
Fork 0

Use the right parameters to configure datasource

This patch uses the user and password instead of setting basic auth that
is used as credentials when connecting to the Grafana server. In our
case we are using the grafana configuration on the minion to connect to
Grafana. This patch also adds an option to set the datasource as the
default one.
This commit is contained in:
Guillaume Thouvenin 2016-11-02 15:50:17 +01:00
parent 5bbb9f23e0
commit eed48db172
1 changed files with 8 additions and 3 deletions

View File

@ -19,9 +19,14 @@ grafana_client_datasource_{{ datasource_name }}:
- access: proxy
{%- endif %}
{%- if datasource.user is defined %}
- basic_auth: true
- basic_auth_user: {{ datasource.user }}
- basic_auth_password: {{ datasource.password }}
- user: {{ datasource.user }}
- password: {{ datasource.password }}
{%- endif %}
{%- if datasource.get('is_default', false) %}
- is_default: {{ datasource.is_default }}
{%- endif %}
{%- if datasource.database is defined %}
- database: {{ datasource.database }}
{%- endif %}
{%- endfor %}