Skip to content

Commit

Permalink
add: allow generic prometheus source
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-hash authored Oct 12, 2024
1 parent 8eddbdf commit cc8625a
Showing 1 changed file with 46 additions and 36 deletions.
82 changes: 46 additions & 36 deletions app/src/main/resources/grafana/explorer-backend-overview.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS_ID",
"label": "Prometheus Data Source",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"annotations": {
"list": [
{
Expand All @@ -24,7 +34,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -76,7 +86,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"disableTextWrap": false,
"editorMode": "builder",
Expand All @@ -96,7 +106,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -148,7 +158,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"disableTextWrap": false,
"editorMode": "builder",
Expand All @@ -168,7 +178,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -220,7 +230,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"disableTextWrap": false,
"editorMode": "builder",
Expand All @@ -240,7 +250,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"description": "Database Idle Connections",
"fieldConfig": {
Expand Down Expand Up @@ -289,7 +299,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "hikaricp_connections_idle",
"instant": true,
Expand All @@ -304,7 +314,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"description": "Threads Awaiting Connection",
"fieldConfig": {
Expand Down Expand Up @@ -353,7 +363,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "hikaricp_connections_pending",
"instant": true,
Expand All @@ -368,7 +378,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"description": "Database Current Connections",
"fieldConfig": {
Expand Down Expand Up @@ -426,7 +436,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "hikaricp_connections",
"instant": true,
Expand All @@ -441,7 +451,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"description": "Database Active Connections",
"fieldConfig": {
Expand Down Expand Up @@ -490,7 +500,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "hikaricp_connections_active",
"instant": true,
Expand All @@ -509,7 +519,7 @@
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"description": "Number of requests per second, grouped by endpoint",
"fieldConfig": {
Expand Down Expand Up @@ -556,7 +566,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "sum(irate(explorer_backend_request_total{app=\"explorer-backend\"}[1m])) by (path)",
"format": "time_series",
Expand All @@ -568,7 +578,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "sum(irate(explorer_backend_request_total{app=\"explorer-backend\"}[1m]))",
"interval": "",
Expand Down Expand Up @@ -614,7 +624,7 @@
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"description": "Failed requests count in last 1 minute",
"fieldConfig": {
Expand Down Expand Up @@ -661,7 +671,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "sum(increase(explorer_backend_request_total{app=\"explorer-backend\",status=\"5xx\"}[1m])) by (path)",
"interval": "",
Expand Down Expand Up @@ -707,7 +717,7 @@
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -754,7 +764,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "histogram_quantile(0.99, sum(irate(explorer_backend_request_duration_seconds_bucket{app=\"explorer-backend\"}[1m])) by (le))",
"interval": "",
Expand All @@ -764,7 +774,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "histogram_quantile(0.95, sum(irate(explorer_backend_request_duration_seconds_bucket{app=\"explorer-backend\"}[1m])) by (le))",
"interval": "",
Expand All @@ -774,7 +784,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "histogram_quantile(0.50, sum(irate(explorer_backend_request_duration_seconds_bucket{app=\"explorer-backend\"}[1m])) by (le))",
"interval": "",
Expand All @@ -784,7 +794,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"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]))",
"interval": "",
Expand Down Expand Up @@ -829,7 +839,7 @@
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"description": "",
"fieldConfig": {
Expand Down Expand Up @@ -876,7 +886,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"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))",
"interval": "",
Expand Down Expand Up @@ -921,7 +931,7 @@
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"description": "Postgres transactions per second(committed + rollback)",
"fieldConfig": {
Expand Down Expand Up @@ -968,7 +978,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "irate(postgres_transactions_total{app=\"explorer-backend\"}[1m])",
"interval": "",
Expand Down Expand Up @@ -1014,7 +1024,7 @@
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"description": "Postgres disk blocks read per second",
"fieldConfig": {
Expand Down Expand Up @@ -1061,7 +1071,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "irate(postgres_blocks_hits_total{app=\"explorer-backend\"}[1m])",
"interval": "",
Expand All @@ -1071,7 +1081,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "irate(postgres_blocks_reads_total{app=\"explorer-backend\"}[1m])",
"interval": "",
Expand Down Expand Up @@ -1117,7 +1127,7 @@
"dashes": false,
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"description": "Postgres rows read/write per second",
"fieldConfig": {
Expand Down Expand Up @@ -1164,7 +1174,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "irate(postgres_rows_fetched_total{app=\"explorer-backend\"}[1m])",
"interval": "",
Expand All @@ -1174,7 +1184,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "irate(postgres_rows_inserted_total{app=\"explorer-backend\"}[1m])",
"interval": "",
Expand All @@ -1184,7 +1194,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "irate(postgres_rows_updated_total{app=\"explorer-backend\"}[1m])",
"interval": "",
Expand All @@ -1194,7 +1204,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "FWwc47WVk"
"uid": "${DS_PROMETHEUS_ID}"
},
"expr": "irate(postgres_rows_deleted_total{app=\"explorer-backend\"}[1m])",
"interval": "",
Expand Down

0 comments on commit cc8625a

Please sign in to comment.