From 2b88a6781526a75515a5f68a4111586c65b955cd Mon Sep 17 00:00:00 2001 From: MyonKeminta Date: Thu, 14 Mar 2024 15:06:57 +0800 Subject: [PATCH 1/2] metrics: Add slow score related metrics to grafana dashboard --- pkg/metrics/grafana/tidb.json | 182 ++++++++++++++++++++++++++++++++++ 1 file changed, 182 insertions(+) diff --git a/pkg/metrics/grafana/tidb.json b/pkg/metrics/grafana/tidb.json index fd4e8e1b75d00..5a21bb8258fa8 100644 --- a/pkg/metrics/grafana/tidb.json +++ b/pkg/metrics/grafana/tidb.json @@ -11419,6 +11419,188 @@ "align": false, "alignLevel": null } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "description": "The slow score calculated by time cost of some specific TiKV RPC requests.", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 0, + "y": 36 + }, + "hiddenSeries": false, + "id": 23763572007, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.27", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "editorMode": "code", + "exemplar": true, + "expr": "max(tidb_tikvclient_store_slow_score{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}) by (store)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "store-{{store}}", + "range": true, + "refId": "A", + "step": 30 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Client-side slow score", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:327", + "format": "none", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:328", + "format": "Bps", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_TEST-CLUSTER}", + "description": "The slow score calculated by TiKV rafstore and sent to TiDB via health feedback.", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 8, + "x": 8, + "y": 36 + }, + "hiddenSeries": false, + "id": 23763572008, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.27", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "editorMode": "code", + "exemplar": true, + "expr": "max(tidb_tikvclient_feedback_slow_score{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\"}) by (store)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "store-{{store}}", + "range": true, + "refId": "A", + "step": 30 + } + ], + "thresholds": [], + "timeRegions": [], + "title": "TiKV-side slow score", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:327", + "format": "none", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:328", + "format": "Bps", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } } ], "repeat": null, From d7df81c5591242ef96d3512a9364b7987e1ab9dc Mon Sep 17 00:00:00 2001 From: MyonKeminta Date: Thu, 14 Mar 2024 18:26:42 +0800 Subject: [PATCH 2/2] fix id Signed-off-by: MyonKeminta --- pkg/metrics/grafana/tidb.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/metrics/grafana/tidb.json b/pkg/metrics/grafana/tidb.json index 5a21bb8258fa8..fd3e18a1905c3 100644 --- a/pkg/metrics/grafana/tidb.json +++ b/pkg/metrics/grafana/tidb.json @@ -11436,7 +11436,7 @@ "y": 36 }, "hiddenSeries": false, - "id": 23763572007, + "id": 337, "legend": { "alignAsTable": true, "avg": true, @@ -11527,7 +11527,7 @@ "y": 36 }, "hiddenSeries": false, - "id": 23763572008, + "id": 338, "legend": { "alignAsTable": true, "avg": true,