monitoring: Add feature toggles to grafana config

This change allows to activate the new alerts 2.0 with the ngalert flag.
This commit is contained in:
saibotk 2021-06-08 18:36:39 +02:00
parent d3ce8ae1a3
commit d09c8fb1ab
Signed by: saibotk
GPG key ID: 67585F0065E261D5
2 changed files with 7 additions and 0 deletions

View file

@ -59,6 +59,9 @@ monitoring_grafana_oauth:
client_id: "grafana"
client_secret: "something-secret123"
# Additional feature toggles to enable (See https://grafana.com/docs/grafana/latest/administration/configuration/#feature_toggles)
monitoring_grafana_feature_toggles: []
# The influxdb admin credentials that should be created
monitoring_influxdb_admin_username: "admin"
monitoring_influxdb_admin_password: "{{ lookup('passwordstore', monitoring_influxdb_domain + '/db-admin create=true length=42') }}"

View file

@ -48,6 +48,10 @@ services:
- "GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH=contains(roles[*], 'Admin') && 'Admin' || contains(roles[*], 'Editor') && 'Editor' || 'Viewer'"
{% endif %}
{% if monitoring_grafana_feature_toggles is defined and monitoring_grafana_feature_toggles is iterable and monitoring_grafana_feature_toggles | length > 0 %}
- "GF_FEATURE_TOGGLES_ENABLE={% for item in monitoring_grafana_feature_toggles %}{{item}} {% endfor %}"
{% endif %}
restart: always
labels:
- "traefik.enable=true"