From 29b025c42de11923f2d7d26b755d4b89dcf19f54 Mon Sep 17 00:00:00 2001 From: moson-mo Date: Sat, 22 Oct 2022 16:34:27 +0200 Subject: [PATCH] grafana: update grafana dashboard for goaurrpc * Show totals for the last 24 hours (instead of all time) * Add total search requests pie chart Signed-off-by: moson-mo --- roles/grafana/files/dashboards/goaurrpc.json | 133 +++++++++++-------- 1 file changed, 80 insertions(+), 53 deletions(-) diff --git a/roles/grafana/files/dashboards/goaurrpc.json b/roles/grafana/files/dashboards/goaurrpc.json index cecedb2e..ac2cca9c 100644 --- a/roles/grafana/files/dashboards/goaurrpc.json +++ b/roles/grafana/files/dashboards/goaurrpc.json @@ -1,47 +1,4 @@ { - "__inputs": [ - { - "name": "DS_GOAURRPC", - "label": "goaurrpc", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], "annotations": { "list": [ { @@ -124,7 +81,7 @@ "properties": [ { "id": "unit", - "value": "dateTimeAsIsoNoDateIfToday" + "value": "dateTimeFromNow" } ] } @@ -171,7 +128,7 @@ "uid": "Prometheus" }, "editorMode": "builder", - "expr": "sum(rpc_requests)", + "expr": "sum(increase(rpc_requests[24h]))", "hide": false, "legendFormat": "Requests served", "range": true, @@ -183,7 +140,7 @@ "uid": "Prometheus" }, "editorMode": "builder", - "expr": "sum(rpc_requests_rate_limited)", + "expr": "sum(increase(rpc_requests_rate_limited[24h]))", "legendFormat": "Requests rate-limited", "range": true, "refId": "requests_rate_limited" @@ -194,13 +151,14 @@ "uid": "Prometheus" }, "editorMode": "builder", - "expr": "rpc_cache_hits", + "expr": "increase(rpc_cache_hits[24h])", "hide": false, "legendFormat": "Cache hits", "range": true, "refId": "A" } ], + "title": "Stats (last 24 hours)", "type": "stat" }, { @@ -208,6 +166,7 @@ "type": "prometheus", "uid": "Prometheus" }, + "description": "The number of requests by \"type\" within the last 24 hours", "fieldConfig": { "defaults": { "color": { @@ -226,7 +185,7 @@ }, "gridPos": { "h": 7, - "w": 5, + "w": 6, "x": 6, "y": 0 }, @@ -257,13 +216,81 @@ "uid": "Prometheus" }, "editorMode": "builder", - "expr": "sum by(type) (rpc_requests)", + "expr": "sum by(type) (increase(rpc_requests[24h]))", "legendFormat": "__auto", "range": true, "refId": "A" } ], - "title": "Total Requests by type", + "title": "Total requests (last 24 hours)", + "type": "piechart" + }, + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "description": "The number of requests for the search type by \"by\" parameter within the last 24 hours", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 0 + }, + "id": 24, + "options": { + "displayLabels": [], + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "values": [] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "builder", + "expr": "sum by(by) (increase(rpc_requests{type=\"search\"}[24h]))", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Total search-requests (last 24 hours)", "type": "piechart" }, { @@ -329,8 +356,8 @@ }, "gridPos": { "h": 7, - "w": 13, - "x": 11, + "w": 6, + "x": 18, "y": 0 }, "id": 6, @@ -463,7 +490,7 @@ "refId": "A" } ], - "title": "Requests per second by type", + "title": "Requests per second", "type": "timeseries" }, {