Skip to content

Commit 175909c

Browse files
committed
Allow DS_PROMETHEUS substitution for grafana dashboard
This PR allows the substitution to be used since the datasource was not being picked up correctly
1 parent 4f24a38 commit 175909c

File tree

1 file changed

+55
-31
lines changed

1 file changed

+55
-31
lines changed

examples/grafana-dashboard.json

Lines changed: 55 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
{
2+
"__inputs": [
3+
{
4+
"name": "DS_PROMETHEUS",
5+
"label": "Prometheus",
6+
"description": "",
7+
"type": "datasource",
8+
"pluginId": "prometheus",
9+
"pluginName": "Prometheus"
10+
}
11+
],
12+
"__requires": [
13+
{
14+
"type": "grafana",
15+
"id": "grafana",
16+
"name": "Grafana",
17+
"version": "9.3.6"
18+
},
19+
{
20+
"type": "datasource",
21+
"id": "prometheus",
22+
"name": "Prometheus",
23+
"version": "1.0.0"
24+
}
25+
],
226
"annotations": {
327
"list": [
428
{
@@ -18,14 +42,14 @@
1842
"editable": true,
1943
"fiscalYearStartMonth": 0,
2044
"graphTooltip": 0,
21-
"id": 30,
45+
"id": null,
2246
"links": [],
2347
"liveNow": false,
2448
"panels": [
2549
{
2650
"datasource": {
2751
"type": "prometheus",
28-
"uid": "prometheus"
52+
"uid": "${DS_PROMETHEUS}"
2953
},
3054
"fieldConfig": {
3155
"defaults": {
@@ -76,7 +100,7 @@
76100
{
77101
"datasource": {
78102
"type": "prometheus",
79-
"uid": "prometheus"
103+
"uid": "${DS_PROMETHEUS}"
80104
},
81105
"disableTextWrap": false,
82106
"editorMode": "builder",
@@ -96,7 +120,7 @@
96120
{
97121
"datasource": {
98122
"type": "prometheus",
99-
"uid": "prometheus"
123+
"uid": "${DS_PROMETHEUS}"
100124
},
101125
"fieldConfig": {
102126
"defaults": {
@@ -147,7 +171,7 @@
147171
{
148172
"datasource": {
149173
"type": "prometheus",
150-
"uid": "prometheus"
174+
"uid": "${DS_PROMETHEUS}"
151175
},
152176
"disableTextWrap": false,
153177
"editorMode": "builder",
@@ -167,7 +191,7 @@
167191
{
168192
"datasource": {
169193
"type": "prometheus",
170-
"uid": "prometheus"
194+
"uid": "${DS_PROMETHEUS}"
171195
},
172196
"fieldConfig": {
173197
"defaults": {
@@ -218,7 +242,7 @@
218242
{
219243
"datasource": {
220244
"type": "prometheus",
221-
"uid": "prometheus"
245+
"uid": "${DS_PROMETHEUS}"
222246
},
223247
"disableTextWrap": false,
224248
"editorMode": "builder",
@@ -238,7 +262,7 @@
238262
{
239263
"datasource": {
240264
"type": "prometheus",
241-
"uid": "prometheus"
265+
"uid": "${DS_PROMETHEUS}"
242266
},
243267
"fieldConfig": {
244268
"defaults": {
@@ -289,7 +313,7 @@
289313
{
290314
"datasource": {
291315
"type": "prometheus",
292-
"uid": "prometheus"
316+
"uid": "${DS_PROMETHEUS}"
293317
},
294318
"disableTextWrap": false,
295319
"editorMode": "builder",
@@ -309,7 +333,7 @@
309333
{
310334
"datasource": {
311335
"type": "prometheus",
312-
"uid": "prometheus"
336+
"uid": "${DS_PROMETHEUS}"
313337
},
314338
"fieldConfig": {
315339
"defaults": {
@@ -387,7 +411,7 @@
387411
{
388412
"datasource": {
389413
"type": "prometheus",
390-
"uid": "prometheus"
414+
"uid": "${DS_PROMETHEUS}"
391415
},
392416
"disableTextWrap": false,
393417
"editorMode": "builder",
@@ -407,7 +431,7 @@
407431
{
408432
"datasource": {
409433
"type": "prometheus",
410-
"uid": "prometheus"
434+
"uid": "${DS_PROMETHEUS}"
411435
},
412436
"fieldConfig": {
413437
"defaults": {
@@ -485,7 +509,7 @@
485509
{
486510
"datasource": {
487511
"type": "prometheus",
488-
"uid": "prometheus"
512+
"uid": "${DS_PROMETHEUS}"
489513
},
490514
"disableTextWrap": false,
491515
"editorMode": "builder",
@@ -505,7 +529,7 @@
505529
{
506530
"datasource": {
507531
"type": "prometheus",
508-
"uid": "prometheus"
532+
"uid": "${DS_PROMETHEUS}"
509533
},
510534
"fieldConfig": {
511535
"defaults": {
@@ -583,7 +607,7 @@
583607
{
584608
"datasource": {
585609
"type": "prometheus",
586-
"uid": "prometheus"
610+
"uid": "${DS_PROMETHEUS}"
587611
},
588612
"editorMode": "builder",
589613
"expr": "nfd_master_node_update_failures_total",
@@ -598,7 +622,7 @@
598622
{
599623
"datasource": {
600624
"type": "prometheus",
601-
"uid": "prometheus"
625+
"uid": "${DS_PROMETHEUS}"
602626
},
603627
"fieldConfig": {
604628
"defaults": {
@@ -676,7 +700,7 @@
676700
{
677701
"datasource": {
678702
"type": "prometheus",
679-
"uid": "prometheus"
703+
"uid": "${DS_PROMETHEUS}"
680704
},
681705
"editorMode": "builder",
682706
"expr": "nfd_master_nodefeaturerule_processing_errors_total",
@@ -692,7 +716,7 @@
692716
{
693717
"datasource": {
694718
"type": "prometheus",
695-
"uid": "prometheus"
719+
"uid": "${DS_PROMETHEUS}"
696720
},
697721
"fieldConfig": {
698722
"defaults": {
@@ -770,7 +794,7 @@
770794
{
771795
"datasource": {
772796
"type": "prometheus",
773-
"uid": "prometheus"
797+
"uid": "${DS_PROMETHEUS}"
774798
},
775799
"disableTextWrap": false,
776800
"editorMode": "builder",
@@ -789,7 +813,7 @@
789813
{
790814
"datasource": {
791815
"type": "prometheus",
792-
"uid": "prometheus"
816+
"uid": "${DS_PROMETHEUS}"
793817
},
794818
"fieldConfig": {
795819
"defaults": {
@@ -867,7 +891,7 @@
867891
{
868892
"datasource": {
869893
"type": "prometheus",
870-
"uid": "prometheus"
894+
"uid": "${DS_PROMETHEUS}"
871895
},
872896
"disableTextWrap": false,
873897
"editorMode": "builder",
@@ -886,7 +910,7 @@
886910
{
887911
"datasource": {
888912
"type": "prometheus",
889-
"uid": "prometheus"
913+
"uid": "${DS_PROMETHEUS}"
890914
},
891915
"fieldConfig": {
892916
"defaults": {
@@ -937,7 +961,7 @@
937961
{
938962
"datasource": {
939963
"type": "prometheus",
940-
"uid": "prometheus"
964+
"uid": "${DS_PROMETHEUS}"
941965
},
942966
"editorMode": "builder",
943967
"expr": "sum by(le) (nfd_worker_feature_discovery_duration_seconds_bucket)",
@@ -953,7 +977,7 @@
953977
{
954978
"datasource": {
955979
"type": "prometheus",
956-
"uid": "prometheus"
980+
"uid": "${DS_PROMETHEUS}"
957981
},
958982
"fieldConfig": {
959983
"defaults": {
@@ -1004,7 +1028,7 @@
10041028
{
10051029
"datasource": {
10061030
"type": "prometheus",
1007-
"uid": "prometheus"
1031+
"uid": "${DS_PROMETHEUS}"
10081032
},
10091033
"editorMode": "builder",
10101034
"expr": "sum by(le) (nfd_master_nodefeaturerule_processing_duration_seconds_bucket)",
@@ -1020,7 +1044,7 @@
10201044
{
10211045
"datasource": {
10221046
"type": "prometheus",
1023-
"uid": "prometheus"
1047+
"uid": "${DS_PROMETHEUS}"
10241048
},
10251049
"fieldConfig": {
10261050
"defaults": {
@@ -1098,7 +1122,7 @@
10981122
{
10991123
"datasource": {
11001124
"type": "prometheus",
1101-
"uid": "prometheus"
1125+
"uid": "${DS_PROMETHEUS}"
11021126
},
11031127
"editorMode": "builder",
11041128
"expr": "nfd_master_node_labels_rejected_total",
@@ -1113,7 +1137,7 @@
11131137
{
11141138
"datasource": {
11151139
"type": "prometheus",
1116-
"uid": "prometheus"
1140+
"uid": "${DS_PROMETHEUS}"
11171141
},
11181142
"fieldConfig": {
11191143
"defaults": {
@@ -1191,7 +1215,7 @@
11911215
{
11921216
"datasource": {
11931217
"type": "prometheus",
1194-
"uid": "prometheus"
1218+
"uid": "${DS_PROMETHEUS}"
11951219
},
11961220
"editorMode": "builder",
11971221
"expr": "nfd_master_node_extendedresources_rejected_total",
@@ -1207,7 +1231,7 @@
12071231
{
12081232
"datasource": {
12091233
"type": "prometheus",
1210-
"uid": "prometheus"
1234+
"uid": "${DS_PROMETHEUS}"
12111235
},
12121236
"fieldConfig": {
12131237
"defaults": {
@@ -1285,7 +1309,7 @@
12851309
{
12861310
"datasource": {
12871311
"type": "prometheus",
1288-
"uid": "prometheus"
1312+
"uid": "${DS_PROMETHEUS}"
12891313
},
12901314
"editorMode": "builder",
12911315
"expr": "nfd_master_node_taints_rejected_total",

0 commit comments

Comments
 (0)