From d4b00b8dd6976146eb51de3b8a2299782577cb0b Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Mon, 9 Oct 2023 17:21:36 +0800 Subject: [PATCH] cleanup Signed-off-by: Ryan Leung --- metrics/grafana/pd.json | 533 ++++++++++++++++++++++++---------------- 1 file changed, 323 insertions(+), 210 deletions(-) diff --git a/metrics/grafana/pd.json b/metrics/grafana/pd.json index 0076a79c8a10..ee421cc0926b 100644 --- a/metrics/grafana/pd.json +++ b/metrics/grafana/pd.json @@ -69,30 +69,25 @@ "panels": [ { "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], "datasource": "${DS_TEST-CLUSTER}", + "decimals": null, "description": "The total capacity size of the cluster", - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "unit": "decbytes" - } + "editable": true, + "error": false, + "format": "decbytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": false }, "gridPos": { "h": 6, @@ -103,22 +98,38 @@ "id": 10, "interval": null, "links": [], - "maxDataPoints": 100, - "options": { - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "text": {}, - "textMode": "auto" + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "null", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(77, 135, 25, 0.18)", + "full": true, + "lineColor": "rgb(21, 179, 65)", + "show": false }, - "pluginVersion": "7.5.11", + "tableColumn": "", "targets": [ { "expr": "sum(pd_cluster_status{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=\"$instance\",type=\"storage_capacity\"})", @@ -128,37 +139,40 @@ "step": 40 } ], + "thresholds": "", "title": "Storage capacity", - "type": "stat" + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], "datasource": "${DS_TEST-CLUSTER}", + "decimals": 1, "description": "The current storage size of the cluster", - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "decimals": 1, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "unit": "decbytes" - }, - "overrides": [] + "editable": true, + "error": false, + "format": "decbytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true }, "gridPos": { "h": 6, @@ -170,22 +184,38 @@ "id": 38, "interval": null, "links": [], - "maxDataPoints": 100, - "options": { - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "text": {}, - "textMode": "auto" + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "null", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": false }, - "pluginVersion": "7.5.11", + "tableColumn": "", "targets": [ { "expr": "sum(pd_cluster_status{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=\"$instance\",type=\"storage_size\"})", @@ -195,8 +225,18 @@ "step": 40 } ], + "thresholds": "", "title": "Current storage size", - "type": "stat" + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { "cacheTimeout": null, @@ -285,8 +325,23 @@ }, { "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#299c46" + ], "datasource": "${DS_TEST-CLUSTER}", "description": "The count of healthy stores", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, "gridPos": { "h": 6, "w": 4, @@ -296,22 +351,38 @@ "id": 97, "interval": null, "links": [], - "maxDataPoints": 100, - "options": { - "graphMode": "none", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "text": {}, - "textMode": "auto" + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false }, - "pluginVersion": "7.5.11", + "tableColumn": "", "targets": [ { "exemplar": true, @@ -323,40 +394,81 @@ "refId": "A" } ], - "timeFrom": null, - "timeShift": null, + "thresholds": "0,1", "title": "Normal stores", - "type": "stat" + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], "datasource": "${DS_TEST-CLUSTER}", "description": "The total number of Regions without replicas", + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": false + }, "gridPos": { "h": 6, "w": 4, "x": 16, "y": 0 }, - "id": 20, + "id": 21, "interval": null, "links": [], - "maxDataPoints": 100, - "options": { - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "text": {}, - "textMode": "auto" + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "null", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true }, - "pluginVersion": "7.5.11", + "tableColumn": "", "targets": [ { "expr": "sum(pd_cluster_status{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=\"$instance\",type=\"leader_count\"})", @@ -366,25 +478,39 @@ "step": 40 } ], + "thresholds": "", "title": "Number of Regions", - "type": "stat" + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], "datasource": "${DS_TEST-CLUSTER}", "description": "The current peer count of the cluster", - "fieldConfig": { - "defaults": { - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - } + "editable": true, + "error": false, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": false }, "gridPos": { "h": 6, @@ -392,21 +518,41 @@ "x": 20, "y": 0 }, - "id": 18, + "id": 20, + "interval": null, "links": [], - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 }, - "text": {}, - "textMode": "auto" + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "null", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true }, - "pluginVersion": "7.5.11", + "tableColumn": "", "targets": [ { "expr": "sum(pd_cluster_status{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=\"$instance\", type=\"region_count\"})", @@ -417,10 +563,18 @@ "step": 4 } ], - "timeFrom": null, - "timeShift": null, + "thresholds": "", "title": "Current peer count", - "type": "stat" + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { "columns": [ @@ -536,7 +690,7 @@ "timeFrom": "1s", "title": "Abnormal stores", "transform": "timeseries_aggregations", - "type": "table-old" + "type": "table" }, { "alert": { @@ -608,7 +762,6 @@ "nullPointMode": "null", "paceLength": 10, "percentage": false, - "pluginVersion": "7.5.11", "pointradius": 5, "points": false, "renderer": "flot", @@ -699,7 +852,6 @@ "options": { "showHeader": true }, - "pluginVersion": "7.5.11", "tableColumn": "instance", "targets": [ { @@ -806,7 +958,6 @@ "showThresholdMarkers": false, "text": {} }, - "pluginVersion": "7.5.11", "targets": [ { "exemplar": true, @@ -863,7 +1014,6 @@ "showThresholdMarkers": false, "text": {} }, - "pluginVersion": "7.5.11", "targets": [ { "exemplar": true, @@ -940,17 +1090,6 @@ }, { "datasource": "${DS_TEST-CLUSTER}", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "filterable": false - }, - "mappings": [], - "unit": "MBs" - }, - "overrides": [] - }, "gridPos": { "h": 6, "w": 4, @@ -958,24 +1097,33 @@ "y": 13 }, "id": 1112, - "options": { - "showHeader": false - }, - "pluginVersion": "7.5.11", "targets": [ { - "exemplar": true, "expr": "pd_cluster_speed{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=\"$instance\"}", - "instant": true, - "interval": "", "legendFormat": "{{action}}-{{store}}", + "interval": "", + "exemplar": true, + "refId": "A", "queryType": "randomWalk", - "refId": "A" + "instant": true } ], - "timeFrom": null, - "timeShift": null, + "type": "table", "title": "Current scaling speed", + "options": { + "showHeader": false + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "left", + "filterable": false + }, + "mappings": [], + "unit": "MBs" + }, + "overrides": [] + }, "transformations": [ { "id": "reduce", @@ -986,11 +1134,11 @@ } } ], - "type": "table" + "timeFrom": null, + "timeShift": null }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -1061,7 +1209,7 @@ "timeFrom": "1s", "title": "PD scheduler config", "transform": "timeseries_aggregations", - "type": "table-old" + "type": "table" }, { "columns": [], @@ -1184,7 +1332,7 @@ "timeShift": null, "title": "Store limit", "transform": "table", - "type": "table-old" + "type": "table" }, { "cacheTimeout": null, @@ -1249,7 +1397,7 @@ "timeShift": null, "title": "Cluster ID", "transform": "timeseries_aggregations", - "type": "table-old" + "type": "table" }, { "columns": [ @@ -1329,7 +1477,7 @@ "timeShift": null, "title": "Region label isolation level", "transform": "timeseries_aggregations", - "type": "table-old" + "type": "table" }, { "columns": [ @@ -1416,7 +1564,7 @@ "timeFrom": "1s", "title": "Label distribution", "transform": "timeseries_aggregations", - "type": "table-old" + "type": "table" }, { "cacheTimeout": null, @@ -2360,7 +2508,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -3330,7 +3477,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -4534,7 +4680,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -5781,7 +5926,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -6765,7 +6909,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -8163,7 +8306,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -8378,7 +8520,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -8589,7 +8730,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -8800,7 +8940,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -9900,7 +10039,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -10367,7 +10505,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -11554,7 +11691,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -12027,7 +12163,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -12209,7 +12344,6 @@ }, { "collapsed": true, - "datasource": null, "gridPos": { "h": 1, "w": 24, @@ -12819,24 +12953,16 @@ "type": "row" } ], - "refresh": "5s", - "schemaVersion": 27, + "refresh": "15s", + "schemaVersion": 18, "style": "dark", "tags": [], "templating": { "list": [ { "allValue": null, - "current": { - "isNone": true, - "selected": false, - "text": "None", - "value": "" - }, + "current": {}, "datasource": "${DS_TEST-CLUSTER}", - "definition": "", - "description": null, - "error": null, "hide": 2, "includeAll": false, "label": "K8s-cluster", @@ -12846,7 +12972,6 @@ "query": "label_values(pd_cluster_status, k8s_cluster)", "refresh": 2, "regex": "", - "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", "tags": [], @@ -12858,14 +12983,11 @@ "allValue": null, "current": { "isNone": true, - "selected": false, "text": "None", "value": "" }, "datasource": "${DS_TEST-CLUSTER}", "definition": "", - "description": null, - "error": null, "hide": 2, "includeAll": false, "label": "tidb_cluster", @@ -12891,8 +13013,6 @@ }, "datasource": "${DS_TEST-CLUSTER}", "definition": "", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": null, @@ -12913,18 +13033,11 @@ { "allValue": ".*", "current": { - "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] + "text": "All", + "value": "$__all" }, "datasource": "${DS_TEST-CLUSTER}", "definition": "label_values(pd_scheduler_store_status{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}, store)", - "description": null, - "error": null, "hide": 0, "includeAll": true, "label": "store",