From 407c7776fb9206a8e96e3aeada997ef6c00a99bd Mon Sep 17 00:00:00 2001 From: Dmitry Kalashnik Date: Tue, 17 Jul 2018 15:24:26 +0400 Subject: [PATCH] Add condition to remote_storage and pushgateway dashboards Change-Id: If12b9aa69c9d5e40502fe6fafdb296c0bc6a8cfe Closes-Bug: PROD-21466 --- prometheus/meta/grafana.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/prometheus/meta/grafana.yml b/prometheus/meta/grafana.yml index 85c691f..9904974 100644 --- a/prometheus/meta/grafana.yml +++ b/prometheus/meta/grafana.yml @@ -1,13 +1,15 @@ -{% from "prometheus/map.jinja" import server, relay with context %} +{% from "prometheus/map.jinja" import server, remote_storage_adapter, pushgateway, relay with context %} dashboard: prometheus-performances_prometheus: datasource: prometheus format: json template: prometheus/files/grafana_dashboards/server/{{server.version}}/prometheus_performances_prometheus.json +{%- if remote_storage_adapter.get('enabled', False) %} remote_storage_adapter_prometheus: datasource: prometheus format: json template: prometheus/files/grafana_dashboards/remote_storage_adapter_prometheus.json +{%- endif %} prometheus_stats_prometheus: datasource: prometheus format: json @@ -16,10 +18,12 @@ dashboard: datasource: prometheus format: json template: prometheus/files/grafana_dashboards/alertmanager_prometheus.json +{%- if pushgateway.get('enabled', False) %} pushgateway_prometheus: datasource: prometheus format: json template: prometheus/files/grafana_dashboards/pushgateway_prometheus.json +{%- endif %} {%- if relay.get('enabled', False) %} relay_prometheus: datasource: prometheus