{
   "__inputs": [
      {
         "description": "",
         "label": "test-cluster",
         "name": "DS_TEST-CLUSTER",
         "pluginId": "prometheus",
         "pluginName": "Prometheus",
         "type": "datasource"
      }
   ],
   "__requires": [ ],
   "annotations": {
      "list": [ ]
   },
   "editable": true,
   "gnetId": null,
   "graphTooltip": 1,
   "hideControls": false,
   "id": null,
   "links": [ ],
   "panels": [
      {
         "collapse": true,
         "collapsed": true,
         "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
         },
         "id": 2,
         "panels": [
            {
               "datasource": "${DS_TEST-CLUSTER}",
               "fieldConfig": {
                  "overrides": [
                     {
                        "matcher": {
                           "id": "byName",
                           "options": "Burstable"
                        },
                        "properties": [
                           {
                              "id": "mappings",
                              "value": [
                                 {
                                    "options": {
                                       "0": {
                                          "index": 1,
                                          "text": "false"
                                       },
                                       "1": {
                                          "index": 0,
                                          "text": "true"
                                       }
                                    },
                                    "type": "value"
                                 }
                              ]
                           }
                        ]
                     }
                  ]
               },
               "gridPos": {
                  "h": 7,
                  "w": 24,
                  "x": 0,
                  "y": 0
               },
               "id": 3,
               "targets": [
                  {
                     "expr": "max by (resource_group, type) (resource_manager_server_group_config{type=\"priority\"})",
                     "format": "time_series",
                     "instant": true,
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}"
                  },
                  {
                     "expr": "max by (resource_group, type) (resource_manager_server_group_config{type=\"ru_capacity\"}) < bool 0",
                     "format": "time_series",
                     "instant": true,
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}"
                  },
                  {
                     "expr": "max by (resource_group, type) (resource_manager_server_group_config{type=\"ru_per_sec\"})",
                     "format": "time_series",
                     "instant": true,
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}"
                  }
               ],
               "title": "RU Config",
               "transformations": [
                  {
                     "id": "labelsToFields",
                     "options": {
                        "valueLabel": "type"
                     }
                  },
                  {
                     "id": "organize",
                     "options": {
                        "excludeByName": {
                           "Time": true,
                           "__name__": true,
                           "instance": true,
                           "job": true
                        },
                        "indexByName": {
                           "Time": 0,
                           "__name__": 1,
                           "instance": 2,
                           "job": 3,
                           "priority": 5,
                           "resource_group": 4,
                           "ru_capacity": 7,
                           "ru_per_sec": 6
                        },
                        "renameByName": {
                           "priority": "Priority",
                           "resource_group": "Group Name",
                           "ru_capacity": "Burstable",
                           "ru_per_sec": "RU_PER_SEC"
                        }
                     }
                  }
               ],
               "transparent": false,
               "type": "table"
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about request unit cost for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 4,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_unit_read_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m])) by (resource_group) + sum(rate(resource_manager_resource_unit_write_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m])) by (resource_group)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_unit_read_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m])) + sum(rate(resource_manager_resource_unit_write_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "RU",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 10,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The max request unit cost for resource groups during in a period(20s).",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 5,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": false,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(resource_manager_resource_unit_read_request_unit_max_per_sec{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}) by (resource_group)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-read",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(resource_manager_resource_unit_write_request_unit_max_per_sec{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}) by (resource_group)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-write",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "RU Max (Max Cost During 20s Period)",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 10,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The avg request unit cost for each query.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 6,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "(sum(rate(resource_manager_resource_unit_read_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m])) by (name) + sum(rate(resource_manager_resource_unit_write_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m])) by (name)) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}",
                     "refId": "A"
                  },
                  {
                     "expr": "(sum(rate(resource_manager_resource_unit_read_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m])) + sum(rate(resource_manager_resource_unit_write_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m]))) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "RU Per Query",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 10,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The read request unit cost for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 7,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_unit_read_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_unit_read_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "RRU",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 10,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The avg read request unit cost for each query.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 8,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_unit_read_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m])) by (name) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_unit_read_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m])) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "RRU Per Query",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 10,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The write request unit cost for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 9,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_unit_write_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_unit_write_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "WRU",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 10,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The avg write request unit cost for each query.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 10,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_unit_write_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m])) by (name) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_unit_write_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"|tp\"}[1m])) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "WRU Per Query",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 10,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            }
         ],
         "repeat": null,
         "repeatIteration": null,
         "repeatRowId": null,
         "showTitle": true,
         "title": "Resource Unit",
         "titleSize": "h6",
         "type": "row"
      },
      {
         "collapse": true,
         "collapsed": true,
         "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
         },
         "id": 11,
         "panels": [
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about kv request count for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 12,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_request_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name, type)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}-{{type}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_request_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}-total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "KV Request Count",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The avg kv request count for each query.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 13,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_request_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=\"read\"}[1m])) by (name) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}-read",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_request_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=\"write\"}[1m])) by (name) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}-write",
                     "refId": "B"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_request_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=\"read\"}[1m])) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total-read",
                     "refId": "C"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_request_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=\"write\"}[1m])) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total-write",
                     "refId": "D"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "KV Request Count Per Query",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about bytes read for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 14,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_read_byte_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_read_byte_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Bytes Read",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "bytes",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "bytes",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The avg bytes read for each query.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 15,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_read_byte_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_read_byte_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Bytes Read Per Query",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "bytes",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "bytes",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about bytes written for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 16,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_write_byte_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_write_byte_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Bytes Written",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "bytes",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "bytes",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The avg bytes written for each query.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 17,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_write_byte_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_write_byte_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) / sum(rate(tidb_session_resource_group_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Bytes Written Per Query",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "bytes",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "bytes",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about kv cpu time for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 18,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_kv_cpu_time_ms_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_kv_cpu_time_ms_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "KV CPU Time",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "ms",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "ms",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about sql cpu time for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 19,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_sql_cpu_time_ms_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_sql_cpu_time_ms_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "SQL CPU Time",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "ms",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "ms",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            }
         ],
         "repeat": null,
         "repeatIteration": null,
         "repeatRowId": null,
         "showTitle": true,
         "title": "Resource Details",
         "titleSize": "h6",
         "type": "row"
      },
      {
         "collapse": true,
         "collapsed": true,
         "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
         },
         "id": 20,
         "panels": [
            {
               "aliasColors": { },
               "bars": true,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about active resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 24,
                  "x": 0,
                  "y": 0
               },
               "id": 21,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": false,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "resource_manager_client_resource_group_status{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{name}}",
                     "refId": "A"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Active Resource Groups",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about total kv request count.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 22,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": false,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_client_request_success_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance) + sum(rate(resource_manager_client_request_fail{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-total",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_client_request_success_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance, name) + sum(rate(resource_manager_client_request_fail{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance, name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Total KV Request Count",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about failed kv request count.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 23,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": false,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_client_request_fail{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance, name, type)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}-{{type}}-{{instance}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_client_request_fail{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance)",
                     "format": "time_series",
                     "hide": true,
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Failed KV Request Count",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about successful kv request wait duration.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 24,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "histogram_quantile(0.99, sum(rate(resource_manager_client_request_success_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance, name, le))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{name}}-99",
                     "refId": "A"
                  },
                  {
                     "expr": "histogram_quantile(0.9, sum(rate(resource_manager_client_request_success_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance, name, le))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{name}}-90",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Successful KV Request Wait Duration",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about successful kv request count.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 25,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": false,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_client_request_success_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-total",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_client_request_success_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance, name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{name}}",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Successful KV Request Count",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about token request handle duration.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 26,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": false,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "histogram_quantile(0.99, sum(rate(resource_manager_client_token_request_duration_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance, le))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{name}}-99",
                     "refId": "A"
                  },
                  {
                     "expr": "histogram_quantile(0.999, sum(rate(resource_manager_client_token_request_duration_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance, le))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{name}}-999",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Token Request Handle Duration",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "s",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "s",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The metrics about token request count.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 27,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": false,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(delta(resource_manager_client_token_request_duration_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-total",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(delta(resource_manager_client_token_request_duration_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\", type=\"success\"}[1m])) by (instance)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-successful",
                     "refId": "B"
                  },
                  {
                     "expr": "sum(delta(resource_manager_client_token_request_duration_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\", type=\"fail\"}[1m])) by (instance)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-failed",
                     "refId": "C"
                  },
                  {
                     "expr": "sum(rate(resource_manager_client_token_request_resource_group{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance, name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{name}}",
                     "refId": "D"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Token Request Count",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            }
         ],
         "repeat": null,
         "repeatIteration": null,
         "repeatRowId": null,
         "showTitle": true,
         "title": "Client",
         "titleSize": "h6",
         "type": "row"
      },
      {
         "collapse": true,
         "collapsed": true,
         "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
         },
         "id": 28,
         "panels": [
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "TiDB max durations for different resource group",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 29,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "histogram_quantile(1.0, sum(rate(tidb_server_handle_query_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}[1m])) by (le,resource_group))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}",
                     "refId": "A"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Query Max Duration",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "s",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "s",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "Runaway manager events for different resource group",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 30,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(tidb_server_query_runaway_check{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=\"hit\"}[5m])) by (resource_group)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-hit",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(tidb_server_query_runaway_check{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type!=\"hit\"}[5m])) by (resource_group, type, action)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-{{type}}-{{action}}",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Runaway Event",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            }
         ],
         "repeat": null,
         "repeatIteration": null,
         "repeatRowId": null,
         "showTitle": true,
         "title": "Runaway",
         "titleSize": "h6",
         "type": "row"
      },
      {
         "collapse": true,
         "collapsed": true,
         "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
         },
         "id": 31,
         "panels": [
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The total CPU time cost by tasks of each priority.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 32,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": false,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(tikv_resource_control_priority_task_exec_duration{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance, priority)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{priority}}",
                     "refId": "A"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "CPU Time by Priority",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "µs",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "µs",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The CPU quota limiter applied to each priority.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 33,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": false,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "tikv_resource_control_priority_quota_limit{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\"}",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{priority}}",
                     "refId": "A"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "CPU Quota Limit by Priority",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "µs",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "µs",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "Tasks number per second that triggers quota limiter wait",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 34,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": false,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(tikv_resource_control_priority_wait_duration_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tidb_instance\"}[1m])) by (instance, priority)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{priority}}",
                     "refId": "A"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Tasks Wait QPS by Priority",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The wait Duration of tasks that triggers quota limiter wait per priority",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 35,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "histogram_quantile(0.99, sum(rate(tikv_resource_control_priority_wait_duration_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\"}[1m])) by (instance, priority, le))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{priority}}-P99",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(tikv_resource_control_priority_wait_duration_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\"}[1m])) by (instance, priority) / sum(rate(tikv_resource_control_priority_wait_duration_count{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\"}[1m])) by (instance, priority)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{priority}}-avg",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Priority Task Wait Duration",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "s",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "s",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            }
         ],
         "repeat": null,
         "repeatIteration": null,
         "repeatRowId": null,
         "showTitle": true,
         "title": "Priority Task Control",
         "titleSize": "h6",
         "type": "row"
      },
      {
         "collapse": true,
         "collapsed": true,
         "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
         },
         "id": 36,
         "panels": [
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The total background task's request unit cost for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 37,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(resource_manager_resource_unit_read_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"background\"}[1m])) by (name) + sum(rate(resource_manager_resource_unit_write_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"background\"}[1m])) by (name)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{name}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(resource_manager_resource_unit_read_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"background\"}[1m])) + sum(rate(resource_manager_resource_unit_write_request_unit_sum{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", type=~\"background\"}[1m]))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Background Task RU",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 10,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The resource(CPU, IO) utilization percentage and limit of background tasks.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 38,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "tikv_resource_control_bg_resource_utilization{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\"}",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}-{{type}}",
                     "refId": "A"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Background Task Resource Utilization",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "percent",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "percent",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The total background task's io limit for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 39,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "tikv_resource_control_background_quota_limiter{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", type=\"io\"}",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-{{instance}}",
                     "refId": "A"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Background Task IO Limit",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "bytes",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "bytes",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The total background task's cpu consumption for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 40,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "rate(tikv_resource_control_background_resource_consumption{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", type=\"cpu\"}[1m])",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-{{instance}}",
                     "refId": "A"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Background Task CPU Consumption",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "µs",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "µs",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The total background task's cpu limit for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 41,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "tikv_resource_control_background_quota_limiter{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", type=\"cpu\"}",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-{{instance}}",
                     "refId": "A"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Background Task CPU Limit",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "µs",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "µs",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The total background task's io consumption for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 42,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "rate(tikv_resource_control_background_resource_consumption{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\", type=\"io\"}[1m])",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-{{instance}}",
                     "refId": "A"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Background Task IO Consumption",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "bytes",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "bytes",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The total background task's wait duration for all resource groups.",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 43,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "rate(tikv_resource_control_background_task_wait_duration{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$tikv_instance\"}[1m])",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-{{instance}}",
                     "refId": "A"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Background Task Total Wait Duration",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "µs",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "µs",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            }
         ],
         "repeat": null,
         "repeatIteration": null,
         "repeatRowId": null,
         "showTitle": true,
         "title": "Background Task Control",
         "titleSize": "h6",
         "type": "row"
      },
      {
         "collapse": true,
         "collapsed": true,
         "gridPos": {
            "h": 1,
            "w": 24,
            "x": 0,
            "y": 0
         },
         "id": 44,
         "panels": [
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The Duration of sql execute for different resource group",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 45,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": true,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "histogram_quantile(0.999, sum(rate(tidb_server_handle_query_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",instance=~\"$tidb_instance\",resource_group=~\"$resource_group\"}[1m])) by (le,resource_group))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-P999",
                     "refId": "A"
                  },
                  {
                     "expr": "histogram_quantile(0.99, sum(rate(tidb_server_handle_query_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",instance=~\"$tidb_instance\",resource_group=~\"$resource_group\"}[1m])) by (le,resource_group))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-P99",
                     "refId": "B"
                  },
                  {
                     "expr": "histogram_quantile(0.9, sum(rate(tidb_server_handle_query_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",instance=~\"$tidb_instance\",resource_group=~\"$resource_group\"}[1m])) by (le,resource_group))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-P90",
                     "refId": "C"
                  },
                  {
                     "expr": "histogram_quantile(0.8, sum(rate(tidb_server_handle_query_duration_seconds_bucket{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",instance=~\"$tidb_instance\",resource_group=~\"$resource_group\"}[1m])) by (le,resource_group))",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}-P80",
                     "refId": "D"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Query Duration",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "s",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "s",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "MySQL commands processing numbers per second. See https://dev.mysql.com/doc/internals/en/text-protocol.html and https://dev.mysql.com/doc/internals/en/prepared-statements.html",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 46,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": false,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(tidb_server_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",instance=~\"$tidb_instance\",resource_group=~\"$resource_group\"}[1m])) by (result,resource_group)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}--{{result}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(tidb_server_query_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",result=\"OK\",instance=~\"$tidb_instance\",resource_group=~\"$resource_group\"}[1m] offset 1d)) by (result,resource_group)",
                     "format": "time_series",
                     "hide": true,
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}--yesterday",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Command Per Second",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 10,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "TiDB statement statistics",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 47,
               "legend": {
                  "alignAsTable": true,
                  "avg": true,
                  "current": true,
                  "max": true,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(rate(tidb_executor_statement_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",instance=~\"$tidb_instance\",resource_group=~\"$resource_group\"}[1m])) by (type,resource_group)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}--{{type}}",
                     "refId": "A"
                  },
                  {
                     "expr": "sum(rate(tidb_executor_statement_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",instance=~\"$tidb_instance\",resource_group=~\"$resource_group\"}[1m])) by (resource_group)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}--total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "QPS",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The number of connections to the TiDB server",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 12,
                  "y": 0
               },
               "id": 48,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": false,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "tidb_server_connections{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",instance=~\"$tidb_instance\",resource_group=~\"$resource_group\"}",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{instance}}--{{resource_group}}",
                     "refId": "A"
                  },
                  {
                     "expr": "tidb_server_connections{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\",instance=~\"$tidb_instance\",resource_group=~\"$resource_group\"}",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{resource_group}}--total",
                     "refId": "B"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Connection Count",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            },
            {
               "aliasColors": { },
               "bars": false,
               "dashLength": 10,
               "dashes": false,
               "datasource": "${DS_TEST-CLUSTER}",
               "description": "The number of failed queries per minute",
               "fill": 1,
               "fillGradient": 0,
               "gridPos": {
                  "h": 7,
                  "w": 12,
                  "x": 0,
                  "y": 0
               },
               "id": 49,
               "legend": {
                  "alignAsTable": true,
                  "avg": false,
                  "current": true,
                  "max": true,
                  "min": false,
                  "rightSide": true,
                  "show": true,
                  "sideWidth": null,
                  "total": false,
                  "values": true
               },
               "lines": true,
               "linewidth": 1,
               "links": [ ],
               "nullPointMode": "null",
               "percentage": false,
               "pointradius": 5,
               "points": false,
               "renderer": "flot",
               "repeat": null,
               "seriesOverrides": [ ],
               "spaceLength": 10,
               "stack": false,
               "steppedLine": false,
               "targets": [
                  {
                     "expr": "sum(increase(tidb_server_execute_error_total{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\", instance=~\"$instance\",resource_group=~\"$resource_group\"}[1m])) by (type, instance,resource_group)",
                     "format": "time_series",
                     "intervalFactor": 2,
                     "legendFormat": "{{type}}--{{instance}}--{{resource_group}}",
                     "refId": "A"
                  }
               ],
               "thresholds": [ ],
               "timeFrom": null,
               "timeShift": null,
               "title": "Failed Query OPM",
               "tooltip": {
                  "shared": true,
                  "sort": 0,
                  "value_type": "individual"
               },
               "type": "graph",
               "xaxis": {
                  "buckets": null,
                  "mode": "time",
                  "name": null,
                  "show": true,
                  "values": [ ]
               },
               "yaxes": [
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 2,
                     "max": null,
                     "min": null,
                     "show": true
                  },
                  {
                     "format": "short",
                     "label": null,
                     "logBase": 1,
                     "max": null,
                     "min": null,
                     "show": true
                  }
               ]
            }
         ],
         "repeat": null,
         "repeatIteration": null,
         "repeatRowId": null,
         "showTitle": true,
         "title": "Query Summary",
         "titleSize": "h6",
         "type": "row"
      }
   ],
   "refresh": "30s",
   "rows": [ ],
   "schemaVersion": 14,
   "style": "dark",
   "tags": [ ],
   "templating": {
      "list": [
         {
            "allValue": null,
            "current": { },
            "datasource": "${DS_TEST-CLUSTER}",
            "hide": 2,
            "includeAll": false,
            "label": "tidb_cluster",
            "multi": false,
            "name": "tidb_cluster",
            "options": [ ],
            "query": "label_values(pd_cluster_status{k8s_cluster=\"$k8s_cluster\"}, tidb_cluster)",
            "refresh": 2,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [ ],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
         },
         {
            "allValue": null,
            "current": { },
            "datasource": "${DS_TEST-CLUSTER}",
            "hide": 2,
            "includeAll": false,
            "label": "K8s-cluster",
            "multi": false,
            "name": "k8s_cluster",
            "options": [ ],
            "query": "label_values(pd_cluster_status, k8s_cluster)",
            "refresh": 2,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [ ],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
         },
         {
            "allValue": ".*",
            "current": { },
            "datasource": "${DS_TEST-CLUSTER}",
            "hide": 0,
            "includeAll": true,
            "label": "TiDB Instance",
            "multi": false,
            "name": "tidb_instance",
            "options": [ ],
            "query": "label_values(tidb_server_connections{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}, instance)",
            "refresh": 1,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [ ],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
         },
         {
            "allValue": ".*",
            "current": { },
            "datasource": "${DS_TEST-CLUSTER}",
            "hide": 0,
            "includeAll": true,
            "label": "TiKV Instance",
            "multi": false,
            "name": "tikv_instance",
            "options": [ ],
            "query": "label_values(tikv_engine_size_bytes{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}, instance)",
            "refresh": 1,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [ ],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
         },
         {
            "allValue": ".*",
            "current": { },
            "datasource": "${DS_TEST-CLUSTER}",
            "hide": 0,
            "includeAll": true,
            "label": "Resource Group",
            "multi": true,
            "name": "resource_group",
            "options": [ ],
            "query": "label_values(tidb_server_connections{k8s_cluster=\"$k8s_cluster\", tidb_cluster=\"$tidb_cluster\"}, resource_group)",
            "refresh": 1,
            "regex": "",
            "sort": 1,
            "tagValuesQuery": "",
            "tags": [ ],
            "tagsQuery": "",
            "type": "query",
            "useTags": false
         }
      ]
   },
   "time": {
      "from": "now-1h",
      "to": "now"
   },
   "timepicker": {
      "refresh_intervals": [
         "5s",
         "10s",
         "30s",
         "1m",
         "5m",
         "15m",
         "30m",
         "1h",
         "2h",
         "1d"
      ],
      "time_options": [
         "5m",
         "15m",
         "1h",
         "6h",
         "12h",
         "24h",
         "2d",
         "7d",
         "30d"
      ]
   },
   "timezone": "browser",
   "title": "Test-Cluster-TiDB-Resource-Control",
   "version": 0
}
