Skip to content

Commit 488902a

Browse files
authored
Merge pull request #573 from sven-hash/patch-1
add: allow generic prometheus source
2 parents 4c19dcd + a9b2c7a commit 488902a

File tree

1 file changed

+46
-36
lines changed

1 file changed

+46
-36
lines changed

app/src/main/resources/grafana/explorer-backend-overview.json

Lines changed: 46 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
{
2+
"__inputs": [
3+
{
4+
"name": "DS_PROMETHEUS_ID",
5+
"label": "Prometheus Data Source",
6+
"description": "",
7+
"type": "datasource",
8+
"pluginId": "prometheus",
9+
"pluginName": "Prometheus"
10+
}
11+
],
212
"annotations": {
313
"list": [
414
{
@@ -24,7 +34,7 @@
2434
{
2535
"datasource": {
2636
"type": "prometheus",
27-
"uid": "FWwc47WVk"
37+
"uid": "${DS_PROMETHEUS_ID}"
2838
},
2939
"fieldConfig": {
3040
"defaults": {
@@ -76,7 +86,7 @@
7686
{
7787
"datasource": {
7888
"type": "prometheus",
79-
"uid": "FWwc47WVk"
89+
"uid": "${DS_PROMETHEUS_ID}"
8090
},
8191
"disableTextWrap": false,
8292
"editorMode": "builder",
@@ -96,7 +106,7 @@
96106
{
97107
"datasource": {
98108
"type": "prometheus",
99-
"uid": "FWwc47WVk"
109+
"uid": "${DS_PROMETHEUS_ID}"
100110
},
101111
"fieldConfig": {
102112
"defaults": {
@@ -148,7 +158,7 @@
148158
{
149159
"datasource": {
150160
"type": "prometheus",
151-
"uid": "FWwc47WVk"
161+
"uid": "${DS_PROMETHEUS_ID}"
152162
},
153163
"disableTextWrap": false,
154164
"editorMode": "builder",
@@ -168,7 +178,7 @@
168178
{
169179
"datasource": {
170180
"type": "prometheus",
171-
"uid": "FWwc47WVk"
181+
"uid": "${DS_PROMETHEUS_ID}"
172182
},
173183
"fieldConfig": {
174184
"defaults": {
@@ -220,7 +230,7 @@
220230
{
221231
"datasource": {
222232
"type": "prometheus",
223-
"uid": "FWwc47WVk"
233+
"uid": "${DS_PROMETHEUS_ID}"
224234
},
225235
"disableTextWrap": false,
226236
"editorMode": "builder",
@@ -240,7 +250,7 @@
240250
{
241251
"datasource": {
242252
"type": "prometheus",
243-
"uid": "FWwc47WVk"
253+
"uid": "${DS_PROMETHEUS_ID}"
244254
},
245255
"description": "Database Idle Connections",
246256
"fieldConfig": {
@@ -289,7 +299,7 @@
289299
{
290300
"datasource": {
291301
"type": "prometheus",
292-
"uid": "FWwc47WVk"
302+
"uid": "${DS_PROMETHEUS_ID}"
293303
},
294304
"expr": "hikaricp_connections_idle",
295305
"instant": true,
@@ -304,7 +314,7 @@
304314
{
305315
"datasource": {
306316
"type": "prometheus",
307-
"uid": "FWwc47WVk"
317+
"uid": "${DS_PROMETHEUS_ID}"
308318
},
309319
"description": "Threads Awaiting Connection",
310320
"fieldConfig": {
@@ -353,7 +363,7 @@
353363
{
354364
"datasource": {
355365
"type": "prometheus",
356-
"uid": "FWwc47WVk"
366+
"uid": "${DS_PROMETHEUS_ID}"
357367
},
358368
"expr": "hikaricp_connections_pending",
359369
"instant": true,
@@ -368,7 +378,7 @@
368378
{
369379
"datasource": {
370380
"type": "prometheus",
371-
"uid": "FWwc47WVk"
381+
"uid": "${DS_PROMETHEUS_ID}"
372382
},
373383
"description": "Database Current Connections",
374384
"fieldConfig": {
@@ -426,7 +436,7 @@
426436
{
427437
"datasource": {
428438
"type": "prometheus",
429-
"uid": "FWwc47WVk"
439+
"uid": "${DS_PROMETHEUS_ID}"
430440
},
431441
"expr": "hikaricp_connections",
432442
"instant": true,
@@ -441,7 +451,7 @@
441451
{
442452
"datasource": {
443453
"type": "prometheus",
444-
"uid": "FWwc47WVk"
454+
"uid": "${DS_PROMETHEUS_ID}"
445455
},
446456
"description": "Database Active Connections",
447457
"fieldConfig": {
@@ -490,7 +500,7 @@
490500
{
491501
"datasource": {
492502
"type": "prometheus",
493-
"uid": "FWwc47WVk"
503+
"uid": "${DS_PROMETHEUS_ID}"
494504
},
495505
"expr": "hikaricp_connections_active",
496506
"instant": true,
@@ -509,7 +519,7 @@
509519
"dashes": false,
510520
"datasource": {
511521
"type": "prometheus",
512-
"uid": "FWwc47WVk"
522+
"uid": "${DS_PROMETHEUS_ID}"
513523
},
514524
"description": "Number of requests per second, grouped by endpoint",
515525
"fieldConfig": {
@@ -556,7 +566,7 @@
556566
{
557567
"datasource": {
558568
"type": "prometheus",
559-
"uid": "FWwc47WVk"
569+
"uid": "${DS_PROMETHEUS_ID}"
560570
},
561571
"expr": "sum(irate(explorer_backend_request_total{app=\"explorer-backend\"}[1m])) by (path)",
562572
"format": "time_series",
@@ -568,7 +578,7 @@
568578
{
569579
"datasource": {
570580
"type": "prometheus",
571-
"uid": "FWwc47WVk"
581+
"uid": "${DS_PROMETHEUS_ID}"
572582
},
573583
"expr": "sum(irate(explorer_backend_request_total{app=\"explorer-backend\"}[1m]))",
574584
"interval": "",
@@ -614,7 +624,7 @@
614624
"dashes": false,
615625
"datasource": {
616626
"type": "prometheus",
617-
"uid": "FWwc47WVk"
627+
"uid": "${DS_PROMETHEUS_ID}"
618628
},
619629
"description": "Failed requests count in last 1 minute",
620630
"fieldConfig": {
@@ -661,7 +671,7 @@
661671
{
662672
"datasource": {
663673
"type": "prometheus",
664-
"uid": "FWwc47WVk"
674+
"uid": "${DS_PROMETHEUS_ID}"
665675
},
666676
"expr": "sum(increase(explorer_backend_request_total{app=\"explorer-backend\",status=\"5xx\"}[1m])) by (path)",
667677
"interval": "",
@@ -707,7 +717,7 @@
707717
"dashes": false,
708718
"datasource": {
709719
"type": "prometheus",
710-
"uid": "FWwc47WVk"
720+
"uid": "${DS_PROMETHEUS_ID}"
711721
},
712722
"fieldConfig": {
713723
"defaults": {
@@ -754,7 +764,7 @@
754764
{
755765
"datasource": {
756766
"type": "prometheus",
757-
"uid": "FWwc47WVk"
767+
"uid": "${DS_PROMETHEUS_ID}"
758768
},
759769
"expr": "histogram_quantile(0.99, sum(irate(explorer_backend_request_duration_seconds_bucket{app=\"explorer-backend\"}[1m])) by (le))",
760770
"interval": "",
@@ -764,7 +774,7 @@
764774
{
765775
"datasource": {
766776
"type": "prometheus",
767-
"uid": "FWwc47WVk"
777+
"uid": "${DS_PROMETHEUS_ID}"
768778
},
769779
"expr": "histogram_quantile(0.95, sum(irate(explorer_backend_request_duration_seconds_bucket{app=\"explorer-backend\"}[1m])) by (le))",
770780
"interval": "",
@@ -774,7 +784,7 @@
774784
{
775785
"datasource": {
776786
"type": "prometheus",
777-
"uid": "FWwc47WVk"
787+
"uid": "${DS_PROMETHEUS_ID}"
778788
},
779789
"expr": "histogram_quantile(0.50, sum(irate(explorer_backend_request_duration_seconds_bucket{app=\"explorer-backend\"}[1m])) by (le))",
780790
"interval": "",
@@ -784,7 +794,7 @@
784794
{
785795
"datasource": {
786796
"type": "prometheus",
787-
"uid": "FWwc47WVk"
797+
"uid": "${DS_PROMETHEUS_ID}"
788798
},
789799
"expr": "sum(irate(explorer_backend_request_duration_seconds_sum{app=\"explorer-backend\"}[1m])) / sum(irate(explorer_backend_request_duration_seconds_count{app=\"explorer-backend\"}[1m]))",
790800
"interval": "",
@@ -829,7 +839,7 @@
829839
"dashes": false,
830840
"datasource": {
831841
"type": "prometheus",
832-
"uid": "FWwc47WVk"
842+
"uid": "${DS_PROMETHEUS_ID}"
833843
},
834844
"description": "",
835845
"fieldConfig": {
@@ -876,7 +886,7 @@
876886
{
877887
"datasource": {
878888
"type": "prometheus",
879-
"uid": "FWwc47WVk"
889+
"uid": "${DS_PROMETHEUS_ID}"
880890
},
881891
"expr": "(sum(irate(explorer_backend_request_duration_seconds_sum{app=\"explorer-backend\"}[1m])) by (path)) / (sum(irate(explorer_backend_request_duration_seconds_count{app=\"explorer-backend\"}[1m])) by (path))",
882892
"interval": "",
@@ -921,7 +931,7 @@
921931
"dashes": false,
922932
"datasource": {
923933
"type": "prometheus",
924-
"uid": "FWwc47WVk"
934+
"uid": "${DS_PROMETHEUS_ID}"
925935
},
926936
"description": "Postgres transactions per second(committed + rollback)",
927937
"fieldConfig": {
@@ -968,7 +978,7 @@
968978
{
969979
"datasource": {
970980
"type": "prometheus",
971-
"uid": "FWwc47WVk"
981+
"uid": "${DS_PROMETHEUS_ID}"
972982
},
973983
"expr": "irate(postgres_transactions_total{app=\"explorer-backend\"}[1m])",
974984
"interval": "",
@@ -1014,7 +1024,7 @@
10141024
"dashes": false,
10151025
"datasource": {
10161026
"type": "prometheus",
1017-
"uid": "FWwc47WVk"
1027+
"uid": "${DS_PROMETHEUS_ID}"
10181028
},
10191029
"description": "Postgres disk blocks read per second",
10201030
"fieldConfig": {
@@ -1061,7 +1071,7 @@
10611071
{
10621072
"datasource": {
10631073
"type": "prometheus",
1064-
"uid": "FWwc47WVk"
1074+
"uid": "${DS_PROMETHEUS_ID}"
10651075
},
10661076
"expr": "irate(postgres_blocks_hits_total{app=\"explorer-backend\"}[1m])",
10671077
"interval": "",
@@ -1071,7 +1081,7 @@
10711081
{
10721082
"datasource": {
10731083
"type": "prometheus",
1074-
"uid": "FWwc47WVk"
1084+
"uid": "${DS_PROMETHEUS_ID}"
10751085
},
10761086
"expr": "irate(postgres_blocks_reads_total{app=\"explorer-backend\"}[1m])",
10771087
"interval": "",
@@ -1117,7 +1127,7 @@
11171127
"dashes": false,
11181128
"datasource": {
11191129
"type": "prometheus",
1120-
"uid": "FWwc47WVk"
1130+
"uid": "${DS_PROMETHEUS_ID}"
11211131
},
11221132
"description": "Postgres rows read/write per second",
11231133
"fieldConfig": {
@@ -1164,7 +1174,7 @@
11641174
{
11651175
"datasource": {
11661176
"type": "prometheus",
1167-
"uid": "FWwc47WVk"
1177+
"uid": "${DS_PROMETHEUS_ID}"
11681178
},
11691179
"expr": "irate(postgres_rows_fetched_total{app=\"explorer-backend\"}[1m])",
11701180
"interval": "",
@@ -1174,7 +1184,7 @@
11741184
{
11751185
"datasource": {
11761186
"type": "prometheus",
1177-
"uid": "FWwc47WVk"
1187+
"uid": "${DS_PROMETHEUS_ID}"
11781188
},
11791189
"expr": "irate(postgres_rows_inserted_total{app=\"explorer-backend\"}[1m])",
11801190
"interval": "",
@@ -1184,7 +1194,7 @@
11841194
{
11851195
"datasource": {
11861196
"type": "prometheus",
1187-
"uid": "FWwc47WVk"
1197+
"uid": "${DS_PROMETHEUS_ID}"
11881198
},
11891199
"expr": "irate(postgres_rows_updated_total{app=\"explorer-backend\"}[1m])",
11901200
"interval": "",
@@ -1194,7 +1204,7 @@
11941204
{
11951205
"datasource": {
11961206
"type": "prometheus",
1197-
"uid": "FWwc47WVk"
1207+
"uid": "${DS_PROMETHEUS_ID}"
11981208
},
11991209
"expr": "irate(postgres_rows_deleted_total{app=\"explorer-backend\"}[1m])",
12001210
"interval": "",

0 commit comments

Comments
 (0)