From eecbd65864bb392355047b2c84f929997ae97a3b Mon Sep 17 00:00:00 2001 From: tabic <76131398+tabic@users.noreply.github.com> Date: Sat, 6 Mar 2021 17:41:18 +0100 Subject: [PATCH] Replace hardcoded datasource name with variable The datasource name was hardcoded to `Prometheus`. The dashboard will throw errors if the prometheus datasource is named different. --- grafana/dashboard.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/grafana/dashboard.json b/grafana/dashboard.json index bd77ea4..10bbda6 100644 --- a/grafana/dashboard.json +++ b/grafana/dashboard.json @@ -100,7 +100,7 @@ "rgba(237, 129, 40, 0.89)", "#299c46" ], - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} @@ -196,7 +196,7 @@ "rgba(237, 129, 40, 0.89)", "#d44a3a" ], - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "decimals": null, "fieldConfig": { "defaults": { @@ -287,7 +287,7 @@ "rgba(237, 129, 40, 0.89)", "#d44a3a" ], - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} @@ -375,7 +375,7 @@ "label": "Others", "threshold": 0 }, - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} @@ -427,7 +427,7 @@ "label": "Others", "threshold": 0 }, - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} @@ -479,7 +479,7 @@ "label": "Others", "threshold": 0 }, - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} @@ -528,7 +528,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": { @@ -639,7 +639,7 @@ }, { "cacheTimeout": null, - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { @@ -717,7 +717,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} @@ -816,7 +816,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} @@ -919,7 +919,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} @@ -1018,7 +1018,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} @@ -1112,7 +1112,7 @@ }, { "columns": [], - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} @@ -1174,7 +1174,7 @@ }, { "columns": [], - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} @@ -1242,7 +1242,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": {} @@ -1346,7 +1346,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "custom": { @@ -1469,7 +1469,7 @@ "text": "10.10.200.20", "value": "10.10.200.20" }, - "datasource": "Prometheus", + "datasource": "${DS_PROMETHEUS}", "definition": "label_values(pihole_ads_blocked_today, hostname)", "hide": 0, "includeAll": false,