{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": null,
  "graphTooltip": 0,
  "id": 156,
  "iteration": 1639639611724,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 8,
      "panels": [],
      "title": "TiDB Overview",
      "type": "row"
    },
    {
      "datasource": null,
      "description": "TiDB clusters created count by kubernetes over selected range, including clusters being deleted.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": []
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 5,
        "x": 0,
        "y": 1
      },
      "id": 43,
      "options": {
        "displayLabels": ["value"],
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "values": []
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": ["lastNotNull"],
          "fields": "",
          "values": false
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.0.2",
      "targets": [
        {
          "exemplar": true,
          "expr": "count by (kubernetes)\n(\navg by (tidb,kubernetes) (max_over_time(dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name|\"}[$__range]))\n* on(tidb) group_left()\ncount by (tidb)(time() - min_over_time(dispatcher_cluster_creation_time[$__range]) < $__range_s)\n)",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "{{kubernetes}}",
          "refId": "A"
        }
      ],
      "title": "Clusters Created Per EKS",
      "transformations": [],
      "type": "piechart"
    },
    {
      "datasource": null,
      "description": "TiDB clusters created count over selected range, including clusters being deleted.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 5,
        "x": 5,
        "y": 1
      },
      "id": 44,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": ["lastNotNull"],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.0.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "count\n(\navg by (tidb) (max_over_time(dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name|\"}[$__range]))\n* on(tidb) \ncount by (tidb)(time() - min_over_time(dispatcher_cluster_creation_time[$__range]) < $__range_s)\n)",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Clusters Created",
      "transformations": [],
      "type": "stat"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 5,
        "x": 10,
        "y": 1
      },
      "id": 35,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": ["lastNotNull"],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.0.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "count(avg(dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name|\"}) by (kubernetes,tidb))",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "TiDB Clusters Count",
      "type": "stat"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": null,
      "description": "#Tidb clusters deployed under current EKS",
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 9,
        "x": 15,
        "y": 1
      },
      "hiddenSeries": false,
      "id": 4,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": false,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.0.7",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "exemplar": true,
          "expr": "count(avg(dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name|\"}) by (kubernetes,tidb))",
          "instant": false,
          "interval": "",
          "legendFormat": "Count",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "TiDB Clusters Count",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:55",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:56",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": []
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 5,
        "x": 0,
        "y": 9
      },
      "id": 34,
      "options": {
        "displayLabels": ["value"],
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "values": ["percent"]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": ["lastNotNull"],
          "fields": "",
          "values": false
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.0.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum by (kind) (avg by(kind,namespace)(dbaas_dev_tier_tenant_num))",
          "interval": "",
          "legendFormat": "{{kind}}",
          "refId": "A"
        }
      ],
      "title": "Tenant Count By Scope",
      "type": "piechart"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": []
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 5,
        "x": 5,
        "y": 9
      },
      "id": 25,
      "options": {
        "displayLabels": ["value"],
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "values": ["percent"]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": ["lastNotNull"],
          "fields": "",
          "values": false
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "count by (phase) (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\",phase!=\"\"})",
          "instant": true,
          "interval": "",
          "legendFormat": "{{phase}}",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "count (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\",phase=\"\"})",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Unknown",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "count (dispatcher_cluster_status_phase{kubernetes=~\"\"})",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Unsched",
          "refId": "C"
        }
      ],
      "title": "Clusters Count By Phase",
      "type": "piechart"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": []
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 5,
        "x": 10,
        "y": 9
      },
      "id": 20,
      "options": {
        "displayLabels": ["value"],
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "values": ["percent"]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": ["lastNotNull"],
          "fields": "",
          "values": false
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "count ((label_replace(sum(increase(tidb_executor_statement_total{cluster_id!=\"\"}[$__range])) by (cluster_id),\"tidb\",\"$1\",\"cluster_id\",\"(.*)\") * on(tidb) (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"}))== 0)",
          "instant": true,
          "interval": "",
          "legendFormat": "Inactive",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "count\n(label_replace(sum(increase(tidb_executor_statement_total{cluster_id!=\"\"}[$__range])) by (cluster_id),\"tidb\",\"$1\",\"cluster_id\",\"(.*)\") * on(tidb) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} > 0)",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Active",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "count (count by (tidb) (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name|\"}) unless count by (tidb)(label_replace(sum(increase(tidb_executor_statement_total{cluster_id!=\"\"}[$__range])) by (cluster_id),\"tidb\",\"$1\",\"cluster_id\",\"(.*)\")))",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Unknown",
          "refId": "C"
        }
      ],
      "title": "Clusters Count By Active Status",
      "type": "piechart"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "axisSoftMin": 0,
            "fillOpacity": 80,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 9,
        "x": 15,
        "y": 9
      },
      "id": 37,
      "options": {
        "barWidth": 0.7,
        "groupWidth": 0.7,
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "orientation": "horizontal",
        "showValue": "auto",
        "text": {},
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "count ((label_replace(sum(increase(tidb_executor_statement_total{cluster_id!=\"\"}[1d])) by (cluster_id),\"tidb\",\"$1\",\"cluster_id\",\"(.*)\") * on(tidb) (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} and on(tidb) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} offset 1d))== 0)",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "At Least 1d",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "count ((label_replace(sum(increase(tidb_executor_statement_total{cluster_id!=\"\"}[2d])) by (cluster_id),\"tidb\",\"$1\",\"cluster_id\",\"(.*)\") * on(tidb) (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} and on(tidb) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} offset 2d))== 0)",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "At Least 2d",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "count ((label_replace(sum(increase(tidb_executor_statement_total{cluster_id!=\"\"}[3d])) by (cluster_id),\"tidb\",\"$1\",\"cluster_id\",\"(.*)\") * on(tidb) (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} and on(tidb) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} offset 3d))== 0)",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "At Least 3d",
          "refId": "C"
        },
        {
          "exemplar": true,
          "expr": "count ((label_replace(sum(increase(tidb_executor_statement_total{cluster_id!=\"\"}[4d])) by (cluster_id),\"tidb\",\"$1\",\"cluster_id\",\"(.*)\") * on(tidb) (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} and on(tidb) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} offset 4d))== 0)",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "At Least 4d",
          "refId": "F"
        },
        {
          "exemplar": true,
          "expr": "count ((label_replace(sum(increase(tidb_executor_statement_total{cluster_id!=\"\"}[5d])) by (cluster_id),\"tidb\",\"$1\",\"cluster_id\",\"(.*)\") * on(tidb) (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} and on(tidb) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} offset 5d))== 0)",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "At Least 5d",
          "refId": "D"
        },
        {
          "exemplar": true,
          "expr": "count ((label_replace(sum(increase(tidb_executor_statement_total{cluster_id!=\"\"}[6d])) by (cluster_id),\"tidb\",\"$1\",\"cluster_id\",\"(.*)\") * on(tidb) (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} and on(tidb) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} offset 6d))== 0)",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "At Least 6d",
          "refId": "E"
        },
        {
          "exemplar": true,
          "expr": "count ((label_replace(sum(increase(tidb_executor_statement_total{cluster_id!=\"\"}[7d])) by (cluster_id),\"tidb\",\"$1\",\"cluster_id\",\"(.*)\") * on(tidb) (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} and on(tidb) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"} offset 7d))== 0)",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "At Least 7d",
          "refId": "G"
        }
      ],
      "title": "Inactive Clusters Count",
      "transformations": [
        {
          "id": "reduce",
          "options": {
            "includeTimeField": false,
            "mode": "seriesToRows",
            "reducers": ["last"]
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Field": "",
              "Last": "Count"
            }
          }
        }
      ],
      "type": "barchart"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto"
          },
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "TiDB Cluster"
            },
            "properties": [
              {
                "id": "links",
                "value": [
                  {
                    "targetBlank": true,
                    "title": "Jump to one screen Tidb",
                    "url": "./d/p1FdsDc7z/troubleshoot-dev-tier-cluster-creation?orgId=1&var-cluster_k8s=${__data.fields[\"EKS Cluster\"]}&var-cluster_id=${__value.text}"
                  }
                ]
              },
              {
                "id": "custom.filterable",
                "value": true
              },
              {
                "id": "custom.width",
                "value": 173
              },
              {
                "id": "unit",
                "value": "string"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "EKS Cluster"
            },
            "properties": [
              {
                "id": "noValue",
                "value": "⚠️Unsheduled"
              },
              {
                "id": "custom.width",
                "value": null
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Phase"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "Creating": {
                        "color": "yellow",
                        "index": 2
                      },
                      "Pending": {
                        "color": "yellow",
                        "index": 1
                      },
                      "Unavailable": {
                        "color": "red",
                        "index": 0
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "green",
                  "mode": "fixed"
                }
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "custom.width",
                "value": null
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Active Status"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "color": "green",
                        "index": 1,
                        "text": "Inactive"
                      }
                    },
                    "type": "value"
                  },
                  {
                    "options": {
                      "from": 0,
                      "result": {
                        "color": "blue",
                        "index": 0,
                        "text": "Active"
                      },
                      "to": 10000000
                    },
                    "type": "range"
                  },
                  {
                    "options": {
                      "match": "null+nan",
                      "result": {
                        "color": "yellow",
                        "index": 2,
                        "text": "Unknown"
                      }
                    },
                    "type": "special"
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "UpTime"
            },
            "properties": [
              {
                "id": "unit",
                "value": "dtdhms"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Cluster Name"
            },
            "properties": [
              {
                "id": "noValue"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Tenant Name"
            },
            "properties": [
              {
                "id": "noValue"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 17
      },
      "id": 14,
      "options": {
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.0.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum (avg (label_replace(up{component=\"tidb\",provider_type=\"aws-free-tier\"},\"tidb\",\"$1\",\"tidb_cluster\",\".*db(.*)\") * on(tidb)  group_left(kubernetes) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"}) by (instance,kubernetes,tidb)) by (kubernetes,tidb)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "sum (avg(label_replace(up{component=\"pd\",provider_type=\"aws-free-tier\"},\"tidb\",\"$1\",\"tidb_cluster\",\".*db(.*)\") * on(tidb)  group_left(kubernetes) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"}) by (instance,kubernetes,tidb)) by (kubernetes,tidb)",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "sum (avg(label_replace(up{component=\"tikv\",provider_type=\"aws-free-tier\"},\"tidb\",\"$1\",\"tidb_cluster\",\".*db(.*)\") * on(tidb)  group_left(kubernetes) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"}) by (instance,kubernetes,tidb)) by (kubernetes,tidb)",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "C"
        },
        {
          "exemplar": true,
          "expr": "sum(avg (label_replace(up{component=\"tiflash\",provider_type=\"aws-free-tier\"},\"tidb\",\"$1\",\"tidb_cluster\",\".*db(.*)\") * on(tidb)  group_left(kubernetes) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"}) by (instance,kubernetes,tidb)) by (kubernetes,tidb)",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "D"
        },
        {
          "exemplar": true,
          "expr": "count (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name|\"}==1) by(kubernetes,tidb,phase)",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "E"
        },
        {
          "exemplar": true,
          "expr": "label_replace(sum(increase(tidb_executor_statement_total{cluster_id!=\"\"}[$__range])) by (cluster_id),\"tidb\",\"$1\",\"cluster_id\",\"(.*)\") * on(tidb) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "F"
        },
        {
          "exemplar": true,
          "expr": "(time() - dispatcher_cluster_creation_time) * on(tidb) dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "G"
        },
        {
          "exemplar": true,
          "expr": "avg by (tidb,name,tenant_name) (label_replace(dbaas_tidb_cluster_info{dev_tier=\"true\"},\"tidb\",\"$1\",\"cluster_id\",\"(.*)\")) * on(tidb) group_left() dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "H"
        }
      ],
      "title": "TiDB Cluster Info",
      "transformations": [
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Value #E": true,
              "Value #H": true
            },
            "indexByName": {
              "Time": 0,
              "Value #A": 6,
              "Value #B": 7,
              "Value #C": 8,
              "Value #D": 9,
              "Value #E": 11,
              "Value #F": 10,
              "Value #G": 12,
              "Value #H": 13,
              "kubernetes": 1,
              "name": 3,
              "phase": 5,
              "tenant_name": 4,
              "tidb": 2
            },
            "renameByName": {
              "Value #A": "TiDB Count",
              "Value #B": "PD Count",
              "Value #C": "TiKV Count",
              "Value #D": "TiFlash Count",
              "Value #F": "Active Status",
              "Value #G": "UpTime",
              "kubernetes": "EKS Cluster",
              "name": "Cluster Name",
              "phase": "Phase",
              "tenant_name": "Tenant Name",
              "tidb": "TiDB Cluster"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 26
      },
      "id": 16,
      "panels": [],
      "title": "Control Plane",
      "type": "row"
    },
    {
      "datasource": null,
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto"
          },
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "EKS Cluster"
            },
            "properties": [
              {
                "id": "custom.filterable",
                "value": true
              },
              {
                "id": "noValue",
                "value": "⚠️Unscheduled"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "TiDB Cluster Count"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": null
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 27
      },
      "id": 18,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Network Count"
          }
        ]
      },
      "pluginVersion": "8.0.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "count by (kubernetes) (dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name|\"})",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "count by (kubernetes) (dispatcher_network_status_phase{kubernetes=~\"$cluster_name|\"})",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "count by (kubernetes) (dispatcher_restore_status_phase{kubernetes=~\"$cluster_name|\"})",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "C"
        },
        {
          "exemplar": true,
          "expr": "count by (kubernetes) (dispatcher_backup_status_phase{kubernetes=~\"$cluster_name|\"})",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "D"
        },
        {
          "exemplar": true,
          "expr": "count by (kubernetes) (dispatcher_import_status_phase{kubernetes=~\"$cluster_name|\"})",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "E"
        }
      ],
      "title": "Infra API Resources",
      "transformations": [
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Value #A": false
            },
            "indexByName": {},
            "renameByName": {
              "Value #A": "TiDB Cluster Count",
              "Value #B": "Network Count",
              "Value #C": "Restore Count",
              "Value #D": "Backup Count",
              "Value #E": "Import Count",
              "kubernetes": "EKS Cluster"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "image"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 727
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "cluster"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 207
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 35
      },
      "id": 41,
      "options": {
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.0.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(kube_pod_container_info{cluster=~\"freetier/eks/$cluster_name\", namespace=~\"tidb-admin\"}) by (cluster,namespace, pod, container, image, image_id)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "sum(kube_pod_container_info{cluster=~\".*base.*\", namespace=~\"free-tier\"}) by (cluster,namespace, pod, container, image, image_id)",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "B"
        }
      ],
      "title": "Dev Tier Control Plane Images",
      "transformations": [
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Value #A": true,
              "Value #B": true
            },
            "indexByName": {
              "Time": 0,
              "Value #A": 7,
              "Value #B": 8,
              "cluster": 1,
              "container": 4,
              "image": 5,
              "image_id": 6,
              "namespace": 2,
              "pod": 3
            },
            "renameByName": {
              "cluster": "EKS Cluster",
              "container": ""
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "collapsed": true,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 43
      },
      "id": 2,
      "panels": [
        {
          "datasource": null,
          "description": "In order to count all the clusters exposing by both dispatcher_cluster_status_phase and kubernetes metrics.",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 6,
            "x": 0,
            "y": 28
          },
          "id": 10,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": ["lastNotNull"],
              "fields": "",
              "values": false
            },
            "text": {},
            "textMode": "auto"
          },
          "pluginVersion": "8.0.2",
          "targets": [
            {
              "exemplar": true,
              "expr": "count(count(label_replace(up{job=\"kube-state-metrics\",cluster=~\"freetier/eks/$cluster_name\",provider_type=\"aws-free-tier\"},\"kubernetes\",\"$1\",\"cluster\",\"freetier/eks/(.*)\") or dispatcher_cluster_status_phase{kubernetes=~\"$cluster_name\"}) by (kubernetes))",
              "instant": false,
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "title": "EKS Clusters",
          "type": "stat"
        },
        {
          "datasource": null,
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "custom": {
                "align": "auto",
                "displayMode": "auto",
                "filterable": false
              },
              "mappings": [],
              "noValue": "0",
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Up(apiserver)"
                },
                "properties": [
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": true,
                        "title": "Jump to apiserver Status",
                        "url": "./d/09ec8aa1e996d6ffcd6817bbaff4db1b/kubernetes-api-server?orgId=1&refresh=10s&var-cluster=freetier/eks/${__data.fields.kubernetes}"
                      }
                    ]
                  }
                ]
              },
              {
                "matcher": {
                  "id": "byName",
                  "options": "EKS Cluster"
                },
                "properties": [
                  {
                    "id": "links",
                    "value": [
                      {
                        "targetBlank": true,
                        "title": "Jump to Cluster Compute Resources",
                        "url": "./d/efa86fd1d0c121a26444b636a3f509a8/kubernetes-compute-resources-cluster?orgId=1&refresh=10s&var-cluster=freetier/eks/${__value.text}"
                      }
                    ]
                  },
                  {
                    "id": "custom.filterable",
                    "value": true
                  }
                ]
              }
            ]
          },
          "gridPos": {
            "h": 8,
            "w": 18,
            "x": 6,
            "y": 28
          },
          "id": 12,
          "options": {
            "frameIndex": 1,
            "showHeader": true,
            "sortBy": [
              {
                "desc": true,
                "displayName": "NetWork Count"
              }
            ]
          },
          "pluginVersion": "8.0.2",
          "targets": [
            {
              "exemplar": true,
              "expr": "count(label_replace(kube_node_info{cluster=~\"freetier/eks/$cluster_name\"},\"kubernetes\",\"$1\",\"cluster\",\"freetier/eks/(.*)\")) by (kubernetes)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            },
            {
              "exemplar": true,
              "expr": "count(label_replace(up{job=\"apiserver\",cluster=~\"freetier/eks/$cluster_name\"},\"kubernetes\",\"$1\",\"cluster\",\"freetier/eks/(.*)\")) by (kubernetes)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "B"
            },
            {
              "exemplar": true,
              "expr": "sum(count(dispatcher_network_status_phase{kubernetes=~\"$cluster_name\"}) without (phase)) by (kubernetes)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "C"
            },
            {
              "exemplar": true,
              "expr": "sum(label_replace(increase(prometheus_notifications_sent_total{cluster=~\"freetier/eks/$cluster_name\"}[$__range]),\"kubernetes\",\"$1\",\"cluster\",\"freetier/eks/(.*)\")) by (kubernetes)",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "D"
            }
          ],
          "title": "Kubernetes Cluster Info",
          "transformations": [
            {
              "id": "merge",
              "options": {}
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {
                  "Time": true
                },
                "indexByName": {},
                "renameByName": {
                  "Value #A": "Node Count",
                  "Value #B": "Up(apiserver)",
                  "Value #C": "Network Count",
                  "Value #D": "Alerts Over Selected Range",
                  "kubernetes": "EKS Cluster"
                }
              }
            }
          ],
          "type": "table"
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": null,
          "fieldConfig": {
            "defaults": {
              "unit": "short"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 36
          },
          "hiddenSeries": false,
          "id": 23,
          "legend": {
            "alignAsTable": true,
            "avg": false,
            "current": true,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.0.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "exemplar": true,
              "expr": "sum by (cluster) (namespace:kube_pod_container_resource_requests:sum{cluster=~\"freetier/eks/$cluster_name\",resource=\"cpu\"})",
              "interval": "",
              "legendFormat": "{{cluster}}-Requests",
              "refId": "A"
            },
            {
              "exemplar": true,
              "expr": "sum by (cluster) (kube_node_status_allocatable{cluster=~\"freetier/eks/$cluster_name\",resource=\"cpu\"})",
              "hide": false,
              "interval": "",
              "legendFormat": "{{cluster}}-Allocatable",
              "refId": "B"
            },
            {
              "exemplar": true,
              "expr": "cluster:node_cpu:sum_rate5m{cluster=~\"freetier/eks/$cluster_name\"}",
              "hide": false,
              "interval": "",
              "legendFormat": "{{cluster}}-Actual",
              "refId": "C"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Cluster CPU Cores Usage",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:458",
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "$$hashKey": "object:459",
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": null,
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 36
          },
          "hiddenSeries": false,
          "id": 24,
          "legend": {
            "alignAsTable": true,
            "avg": false,
            "current": true,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.0.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "exemplar": true,
              "expr": "sum by (cluster) (namespace:kube_pod_container_resource_requests:sum{cluster=~\"freetier/eks/$cluster_name\",resource=\"memory\"})",
              "interval": "",
              "legendFormat": "{{cluster}}-Requests",
              "refId": "A"
            },
            {
              "exemplar": true,
              "expr": "sum by (cluster) (kube_node_status_allocatable{cluster=~\"freetier/eks/$cluster_name\",resource=\"memory\"})",
              "hide": false,
              "interval": "",
              "legendFormat": "{{cluster}}-Allocatable",
              "refId": "B"
            },
            {
              "exemplar": true,
              "expr": "sum by (cluster) (namespace:container_memory_usage_bytes:sum{cluster=~\"freetier/eks/$cluster_name\"})",
              "hide": false,
              "interval": "",
              "legendFormat": "{{cluster}}-Actual",
              "refId": "C"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "Cluster Memory Usage",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:702",
              "format": "bytes",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "$$hashKey": "object:703",
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "datasource": null,
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "axisSoftMin": 0,
                "fillOpacity": 80,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineWidth": 1
              },
              "mappings": [],
              "max": 1,
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "percentunit"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 11,
            "w": 24,
            "x": 0,
            "y": 44
          },
          "id": 39,
          "options": {
            "barWidth": 0.97,
            "groupWidth": 0.6,
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "right"
            },
            "orientation": "horizontal",
            "showValue": "always",
            "text": {
              "valueSize": 10
            },
            "tooltip": {
              "mode": "single"
            }
          },
          "pluginVersion": "8.0.2",
          "targets": [
            {
              "exemplar": true,
              "expr": "sum by (cluster,node) (kube_pod_container_resource_requests{cluster=~\"freetier/eks/$cluster_name\",resource=\"cpu\"}) / sum by (cluster,node) (kube_node_status_allocatable{cluster=~\"freetier/eks/$cluster_name\",resource=\"cpu\"})",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            },
            {
              "exemplar": true,
              "expr": "sum by (cluster,node) (kube_pod_container_resource_requests{cluster=~\"freetier/eks/$cluster_name\",resource=\"memory\"}) / sum by (cluster,node) (kube_node_status_allocatable{cluster=~\"freetier/eks/$cluster_name\",resource=\"memory\"})",
              "format": "table",
              "hide": false,
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "B"
            }
          ],
          "title": "Node Request Resources",
          "transformations": [
            {
              "id": "merge",
              "options": {}
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {
                  "Time": true,
                  "cluster": true
                },
                "indexByName": {},
                "renameByName": {
                  "Value #A": "CPU",
                  "Value #B": "Memory"
                }
              }
            },
            {
              "id": "sortBy",
              "options": {
                "fields": {},
                "sort": [
                  {
                    "desc": false,
                    "field": "CPU"
                  }
                ]
              }
            }
          ],
          "type": "barchart"
        }
      ],
      "title": "EKS Overview",
      "type": "row"
    },
    {
      "collapsed": true,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 43
      },
      "id": 3,
      "panels": [
        {
          "id": 48,
          "gridPos": {
            "x": 0,
            "y": 3,
            "w": 4,
            "h": 7
          },
          "type": "stat",
          "title": "Connection Count",
          "pluginVersion": "8.5.4",
          "targets": [
            {
              "refId": "A",
              "expr": "sum(gateway_connection_count{cluster=~\".*$cluster_name\"})"
            }
          ],
          "options": {
            "reduceOptions": {
              "values": false,
              "calcs": ["lastNotNull"],
              "fields": ""
            },
            "orientation": "auto",
            "textMode": "auto",
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto"
          },
          "fieldConfig": {
            "defaults": {
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "value": null,
                    "color": "green"
                  },
                  {
                    "value": 80,
                    "color": "red"
                  }
                ]
              },
              "color": {
                "mode": "thresholds"
              }
            },
            "overrides": []
          }
        },
        {
          "id": 50,
          "gridPos": {
            "x": 4,
            "y": 3,
            "w": 4,
            "h": 7
          },
          "type": "piechart",
          "title": "Compression",
          "pluginVersion": "8.5.4",
          "targets": [
            {
              "refId": "A",
              "expr": "sum(gateway_connection_count{cluster=~\".*$cluster_name\"}) by (compression)",
              "editorMode": "code",
              "range": true,
              "legendFormat": "__auto"
            }
          ],
          "options": {
            "reduceOptions": {
              "values": false,
              "calcs": ["lastNotNull"],
              "fields": ""
            },
            "pieType": "pie",
            "tooltip": {
              "mode": "single",
              "sort": "none"
            },
            "legend": {
              "displayMode": "list",
              "placement": "bottom",
              "values": []
            },
            "displayLabels": []
          },
          "fieldConfig": {
            "defaults": {
              "custom": {
                "hideFrom": {
                  "tooltip": false,
                  "viz": false,
                  "legend": false
                }
              },
              "color": {
                "mode": "palette-classic"
              },
              "mappings": []
            },
            "overrides": []
          }
        },
        {
          "id": 51,
          "gridPos": {
            "x": 8,
            "y": 3,
            "w": 4,
            "h": 7
          },
          "type": "piechart",
          "title": "TLS",
          "pluginVersion": "8.5.4",
          "targets": [
            {
              "refId": "A",
              "expr": "sum(gateway_connection_count{cluster=~\".*$cluster_name\"}) by (tls)",
              "editorMode": "code",
              "range": true,
              "legendFormat": "__auto",
              "hide": false
            }
          ],
          "options": {
            "reduceOptions": {
              "values": false,
              "calcs": ["lastNotNull"],
              "fields": ""
            },
            "pieType": "pie",
            "tooltip": {
              "mode": "single",
              "sort": "none"
            },
            "legend": {
              "displayMode": "list",
              "placement": "bottom",
              "values": []
            },
            "displayLabels": []
          },
          "fieldConfig": {
            "defaults": {
              "custom": {
                "hideFrom": {
                  "tooltip": false,
                  "viz": false,
                  "legend": false
                }
              },
              "color": {
                "mode": "palette-classic"
              },
              "mappings": []
            },
            "overrides": []
          }
        },
        {
          "id": 52,
          "gridPos": {
            "x": 12,
            "y": 3,
            "w": 12,
            "h": 7
          },
          "type": "timeseries",
          "title": "Connection Events",
          "pluginVersion": "8.5.4",
          "targets": [
            {
              "refId": "A",
              "hide": false,
              "expr": "sum(increase(gateway_connection_total{cluster=~\".*$cluster_name\"}[1h])) by (stage)",
              "editorMode": "code",
              "range": true,
              "legendFormat": "__auto"
            }
          ],
          "options": {
            "tooltip": {
              "mode": "single",
              "sort": "none"
            },
            "legend": {
              "displayMode": "table",
              "placement": "right",
              "calcs": ["lastNotNull", "max", "mean"],
              "sortBy": "Mean",
              "sortDesc": true
            }
          },
          "fieldConfig": {
            "defaults": {
              "custom": {
                "drawStyle": "line",
                "lineInterpolation": "linear",
                "barAlignment": 0,
                "lineWidth": 1,
                "fillOpacity": 0,
                "gradientMode": "none",
                "spanNulls": false,
                "showPoints": "auto",
                "pointSize": 5,
                "stacking": {
                  "mode": "none",
                  "group": "A"
                },
                "axisPlacement": "auto",
                "axisLabel": "",
                "scaleDistribution": {
                  "type": "linear"
                },
                "hideFrom": {
                  "tooltip": false,
                  "viz": false,
                  "legend": false
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "color": {
                "mode": "palette-classic"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "value": null,
                    "color": "green"
                  },
                  {
                    "value": 80,
                    "color": "red"
                  }
                ]
              },
              "unit": "short"
            },
            "overrides": []
          }
        },
        {
          "id": 49,
          "gridPos": {
            "x": 0,
            "y": 10,
            "w": 12,
            "h": 7
          },
          "type": "timeseries",
          "title": "P95 Connection Duration",
          "pluginVersion": "8.5.4",
          "targets": [
            {
              "refId": "A",
              "hide": false,
              "expr": "histogram_quantile(0.95, sum(rate(gateway_connection_seconds_bucket{cluster=~\".*$cluster_name\"}[$__rate_interval])) by (stage, le))",
              "editorMode": "code",
              "range": true,
              "legendFormat": "__auto"
            }
          ],
          "options": {
            "tooltip": {
              "mode": "single",
              "sort": "none"
            },
            "legend": {
              "displayMode": "table",
              "placement": "right",
              "calcs": ["lastNotNull", "max", "mean"],
              "sortBy": "Mean",
              "sortDesc": true
            }
          },
          "fieldConfig": {
            "defaults": {
              "custom": {
                "drawStyle": "line",
                "lineInterpolation": "linear",
                "barAlignment": 0,
                "lineWidth": 1,
                "fillOpacity": 0,
                "gradientMode": "none",
                "spanNulls": false,
                "showPoints": "auto",
                "pointSize": 5,
                "stacking": {
                  "mode": "none",
                  "group": "A"
                },
                "axisPlacement": "auto",
                "axisLabel": "",
                "scaleDistribution": {
                  "type": "linear"
                },
                "hideFrom": {
                  "tooltip": false,
                  "viz": false,
                  "legend": false
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "color": {
                "mode": "palette-classic"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "value": null,
                    "color": "green"
                  },
                  {
                    "value": 80,
                    "color": "red"
                  }
                ]
              },
              "unit": "s"
            },
            "overrides": []
          }
        }
      ],
      "title": "TiDB Gateway",
      "type": "row"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 4
      },
      "id": 54,
      "panels": [
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 2
          },
          "id": 56,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "table",
              "placement": "right",
              "showLegend": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "editorMode": "code",
              "expr": "histogram_quantile(0.95, sum by(tier,le) (rate(cluster_creation_seconds_bucket{cluster=~\".*$cluster_name\"}[$__rate_interval])))",
              "hide": false,
              "legendFormat": "{{label_name}}",
              "range": true,
              "refId": "A"
            }
          ],
          "title": "P95 Cluster creation",
          "type": "timeseries"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 2
          },
          "id": 67,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "table",
              "placement": "right",
              "showLegend": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "editorMode": "code",
              "expr": "histogram_quantile(0.95, sum by(project_id,le) (rate(network_creation_seconds_bucket{cluster=~\".*$cluster_name\"}[$__rate_interval])))",
              "hide": false,
              "legendFormat": "{{label_name}}",
              "range": true,
              "refId": "A"
            }
          ],
          "title": "P95 Network creation",
          "type": "timeseries"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "s"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 18
          },
          "id": 58,
          "options": {
            "legend": {
              "calcs": ["lastNotNull", "max", "mean"],
              "displayMode": "table",
              "placement": "right",
              "showLegend": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "editorMode": "code",
              "expr": "histogram_quantile(0.95, sum by(req_name,resp_code,le) (rate(managerserver_request_seconds_bucket{cluster=~\".*$cluster_name\"}[$__rate_interval])))",
              "hide": false,
              "legendFormat": "{{req_name}}:{{resp_code}}",
              "range": true,
              "refId": "A"
            }
          ],
          "title": "P95 Manager server request",
          "type": "timeseries"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "s"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 18
          },
          "id": 59,
          "options": {
            "legend": {
              "calcs": ["lastNotNull", "max", "mean"],
              "displayMode": "table",
              "placement": "right",
              "showLegend": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "editorMode": "code",
              "expr": "histogram_quantile(0.95, sum by(stage, le) (rate(tidbmanager_assign_tidb_seconds_bucket{cluster=~\".*$cluster_name\"}[$__rate_interval])))",
              "hide": false,
              "legendFormat": "assign:{{stage}}",
              "range": true,
              "refId": "A"
            },
            {
              "editorMode": "code",
              "expr": "histogram_quantile(0.95, sum by(status_code, le) (rate(tidbmanager_activate_seconds_bucket{cluster=~\".*$cluster_name\"}[$__rate_interval])))",
              "hide": false,
              "legendFormat": "activate:{{status_code}}",
              "range": true,
              "refId": "B"
            }
          ],
          "title": "P95 Assign/Activate tidb",
          "type": "timeseries"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "opm"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 26
          },
          "id": 62,
          "options": {
            "legend": {
              "calcs": ["lastNotNull", "max", "mean"],
              "displayMode": "table",
              "placement": "right",
              "showLegend": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "editorMode": "code",
              "expr": "sum(increase(tidbmanager_event_total{cluster=~\".*$cluster_name\"}[1m])) by (event_type,key_type)",
              "hide": false,
              "legendFormat": "{{event_type}}:{{key_type}}",
              "range": true,
              "refId": "A"
            }
          ],
          "title": "Etcd events",
          "type": "timeseries"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "short"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 26
          },
          "id": 69,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "table",
              "placement": "right",
              "showLegend": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "editorMode": "code",
              "expr": "tidbmanager_watch_loop_total{cluster=~\".*$cluster_name\"}",
              "format": "time_series",
              "hide": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "title": "Watch loop",
          "type": "timeseries"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "short"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 34
          },
          "id": 63,
          "options": {
            "legend": {
              "calcs": ["lastNotNull", "max", "mean"],
              "displayMode": "table",
              "placement": "right",
              "showLegend": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "editorMode": "code",
              "expr": "tidbmanager_remove_pod_queue_len{cluster=~\".*$cluster_name\"}",
              "hide": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "title": "Remove pod queue len",
          "type": "timeseries"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "opm"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 34
          },
          "id": 64,
          "options": {
            "legend": {
              "calcs": ["lastNotNull", "max", "mean"],
              "displayMode": "table",
              "placement": "right",
              "showLegend": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "editorMode": "code",
              "expr": "sum(increase(tidbmanager_remove_pod_total{cluster=~\".*$cluster_name\"}[1m])) by (instance)",
              "hide": false,
              "legendFormat": "{{instance}} - remove",
              "range": true,
              "refId": "A"
            },
            {
              "editorMode": "code",
              "expr": "sum(increase(tidbmanager_remove_pod_queue_overflow_total{cluster=~\".*$cluster_name\"}[1m])) by (instance)",
              "hide": false,
              "legendFormat": "{{instance}} - overflow",
              "range": true,
              "refId": "B"
            }
          ],
          "title": "Remove pod",
          "type": "timeseries"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "opm"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 42
          },
          "id": 66,
          "options": {
            "legend": {
              "calcs": ["lastNotNull", "max", "mean"],
              "displayMode": "table",
              "placement": "right",
              "showLegend": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "editorMode": "code",
              "expr": "sum(increase(tidbscaler_lock_total{cluster=~\".*$cluster_name\"}[1m])) by (action,min_pool_size,max_pool_size)",
              "hide": false,
              "legendFormat": "{{action}}:{{min_pool_size}}:{{max_pool_size}}",
              "range": true,
              "refId": "A"
            }
          ],
          "title": "Scaler events",
          "type": "timeseries"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "short"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 42
          },
          "id": 65,
          "options": {
            "legend": {
              "calcs": ["lastNotNull", "max", "min", "mean"],
              "displayMode": "table",
              "placement": "right",
              "showLegend": true,
              "sortBy": "Last *",
              "sortDesc": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "editorMode": "code",
              "expr": "tidbmanager_cache_size{cluster=~\".*$cluster_name\"}",
              "hide": false,
              "legendFormat": "{{instance}} - {{type}}",
              "range": true,
              "refId": "A"
            }
          ],
          "title": "Cache size",
          "type": "timeseries"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "short"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 50
          },
          "id": 70,
          "options": {
            "legend": {
              "calcs": ["lastNotNull", "max", "min", "mean"],
              "displayMode": "table",
              "placement": "right",
              "showLegend": true,
              "sortBy": "Last *",
              "sortDesc": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "editorMode": "code",
              "expr": "tidbupgrader_old_pod_assign_cache_size{cluster=~\".*$cluster_name\"}",
              "hide": false,
              "legendFormat": "old - {{revision}}",
              "range": true,
              "refId": "A"
            },
            {
              "editorMode": "code",
              "expr": "tidbupgrader_assign_cache_size{cluster=~\".*$cluster_name\"}",
              "hide": false,
              "legendFormat": "total - {{revision}}",
              "range": true,
              "refId": "B"
            }
          ],
          "title": "Upgrader assign cache",
          "type": "timeseries"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "short"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 50
          },
          "id": 71,
          "options": {
            "legend": {
              "calcs": ["lastNotNull", "max", "min", "mean"],
              "displayMode": "table",
              "placement": "right",
              "showLegend": true,
              "sortBy": "Last *",
              "sortDesc": true
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "editorMode": "code",
              "expr": "tidbupgrader_old_pod_free_cache_size{cluster=~\".*$cluster_name\"}",
              "hide": false,
              "legendFormat": "old - {{revision}}",
              "range": true,
              "refId": "A"
            },
            {
              "editorMode": "code",
              "expr": "tidbupgrader_free_cache_size{cluster=~\".*$cluster_name\"}",
              "hide": false,
              "legendFormat": "total - {{revision}}",
              "range": true,
              "refId": "B"
            }
          ],
          "title": "Upgrader free cache",
          "type": "timeseries"
        }
      ],
      "title": "TiDB Pool",
      "type": "row"
    }
  ],
  "refresh": "",
  "schemaVersion": 30,
  "style": "dark",
  "tags": ["Dev-tier"],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "selected": true,
          "text": ["All"],
          "value": ["$__all"]
        },
        "datasource": null,
        "definition": "query_result(count (max_over_time(dispatcher_cluster_status_phase{namespace!~\".*e2e.*\",tidb!~\"e2e-test-.*\"}[$__range])or  label_replace(up{job=\"kube-state-metrics\",cluster!~\"db.*\",provider_type=\"aws-free-tier\"},\"kubernetes\",\"$1\",\"cluster\",\"freetier/eks/(.*)\")) by (kubernetes))",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "EKS Cluster",
        "multi": true,
        "name": "cluster_name",
        "options": [],
        "query": {
          "query": "query_result(count (max_over_time(dispatcher_cluster_status_phase{namespace!~\".*e2e.*\",tidb!~\"e2e-test-.*\"}[$__range])or  label_replace(up{job=\"kube-state-metrics\",cluster!~\"db.*\",provider_type=\"aws-free-tier\"},\"kubernetes\",\"$1\",\"cluster\",\"freetier/eks/(.*)\")) by (kubernetes))",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "/.*kubernetes=\"(.*)\".*/",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Dev Tier Clusters Overview",
  "uid": "XnuGx8N7z",
  "version": 1
}
