{
  "name": "TiDB Cloud Dynamic Tracker",
  "description": null,
  "pages": [
    {
      "name": "SQL Statements",
      "description": null,
      "widgets": [
        {
          "title": "",
          "layout": {
            "column": 1,
            "row": 1,
            "width": 12,
            "height": 1
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.markdown"
          },
          "rawConfiguration": {
            "text": "This dashboard provides a **high-level** overview of your TiDB clusters.\n\nFurther reading on TiDB monitoring: [Metrics available to New Relic](https://docs.pingcap.com/tidbcloud/monitor-new-relic-integration#metrics-available-to-newrelic)\n\nClone this template dashboard to make changes and add your own graph widgets."
          }
        },
        {
          "title": "",
          "layout": {
            "column": 1,
            "row": 2,
            "width": 12,
            "height": 1
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.markdown"
          },
          "rawConfiguration": {
            "text": "# Cluster Performance"
          }
        },
        {
          "title": "Database Time",
          "layout": {
            "column": 1,
            "row": 3,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_database_time`) * cardinality(`tidb_cloud.db_database_time`)) AS 'Total' FROM Metric SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              },
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_database_time`) * cardinality(`tidb_cloud.db_database_time`)) FROM Metric FACET sql_type SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "SECONDS"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "Queries Per Second",
          "layout": {
            "column": 7,
            "row": 3,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_query_per_second`) * cardinality(`tidb_cloud.db_query_per_second`)) AS 'Total' FROM Metric SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              },
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_query_per_second`) * cardinality(`tidb_cloud.db_query_per_second`)) FROM Metric FACET type SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "Average Query Duration",
          "layout": {
            "column": 1,
            "row": 6,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT average(`tidb_cloud.db_average_query_duration`) FROM Metric FACET sql_type SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "SECONDS"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "Failed Queries Per Second",
          "layout": {
            "column": 7,
            "row": 6,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_failed_queries`) * cardinality(`tidb_cloud.db_failed_queries`)) AS 'Failed Query' FROM Metric SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "Node Disk Write Latency",
          "layout": {
            "column": 1,
            "row": 9,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_disk_write_latency`) * cardinality(`tidb_cloud.node_disk_write_latency`)) FROM Metric FACET tuple(instance, device) SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "SECONDS"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "Node Disk Read Latency",
          "layout": {
            "column": 7,
            "row": 9,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_disk_read_latency`) * cardinality(`tidb_cloud.node_disk_read_latency`)) FROM Metric FACET tuple(instance, device) SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "SECONDS"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "KV Request Duration",
          "layout": {
            "column": 1,
            "row": 12,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_kv_request_duration`) * cardinality(`tidb_cloud.db_kv_request_duration`)) FROM Metric FACET tuple(instance, type) SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "SECONDS"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "",
          "layout": {
            "column": 1,
            "row": 15,
            "width": 12,
            "height": 1
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.markdown"
          },
          "rawConfiguration": {
            "text": "# Connections"
          }
        },
        {
          "title": "Total Connection",
          "layout": {
            "column": 1,
            "row": 16,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_total_connection`) * cardinality(`tidb_cloud.db_total_connection`)) AS 'Total Conncetion' FROM Metric SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}}) AND component = 'tidb'"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "Active Connections",
          "layout": {
            "column": 7,
            "row": 16,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_active_connections`) * cardinality(`tidb_cloud.db_active_connections`)) AS 'Active Connection' FROM Metric SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "Disconnection Count",
          "layout": {
            "column": 1,
            "row": 19,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_disconnections`) * cardinality(`tidb_cloud.db_disconnections`)) FROM Metric FACET tuple(result, instance) SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "",
          "layout": {
            "column": 1,
            "row": 22,
            "width": 12,
            "height": 1
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.markdown"
          },
          "rawConfiguration": {
            "text": "# Command & Transaction"
          }
        },
        {
          "title": "Command Per Second",
          "layout": {
            "column": 1,
            "row": 23,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_command_per_second`) * cardinality(`tidb_cloud.db_command_per_second`)) AS 'Total' FROM Metric SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              },
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_command_per_second`) * cardinality(`tidb_cloud.db_command_per_second`)) FROM Metric FACET type SINCE 24 HOURS AGO TIMESERIES"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "Queries Using Plan Cache OPS",
          "layout": {
            "column": 7,
            "row": 23,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_queries_using_plan_cache_ops`) * cardinality(`tidb_cloud.db_queries_using_plan_cache_ops`)) AS 'Total' FROM Metric SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "Transaction Per Second",
          "layout": {
            "column": 1,
            "row": 26,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_transaction_per_second`) * cardinality(`tidb_cloud.db_transaction_per_second`)) AS 'Total' FROM Metric SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              },
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_transaction_per_second`) * cardinality(`tidb_cloud.db_transaction_per_second`)) FROM Metric FACET tuple(type, txn_mode) SINCE 24 HOURS AGO TIMESERIES"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "",
          "layout": {
            "column": 1,
            "row": 29,
            "width": 12,
            "height": 1
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.markdown"
          },
          "rawConfiguration": {
            "text": "# Server Related"
          }
        },
        {
          "title": "TiDB Uptime",
          "layout": {
            "column": 1,
            "row": 30,
            "width": 12,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_component_uptime`) * cardinality(`tidb_cloud.db_component_uptime`)) FROM Metric WHERE (component = 'tidb') FACET instance SINCE 24 HOURS AGO TIMESERIES WHERE cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "SECONDS"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "TiDB CPU Capacity",
          "layout": {
            "column": 1,
            "row": 33,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_cpu_capacity_cores`) * cardinality(`tidb_cloud.node_cpu_capacity_cores`)) FROM Metric FACET instance WHERE (component = 'tidb') SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "PERCENTAGE"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiDB CPU Usage",
          "layout": {
            "column": 7,
            "row": 33,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_cpu_seconds_total_rate`) * cardinality(`tidb_cloud.node_cpu_seconds_total_rate`)) FROM Metric WHERE (component = 'tidb') SINCE 60 MINUTES AGO UNTIL NOW FACET instance LIMIT 100 TIMESERIES 120000 SLIDE BY 60000 WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "PERCENTAGE"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "TiDB Memory Capacity",
          "layout": {
            "column": 1,
            "row": 36,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_memory_capacity_bytes`) * cardinality(`tidb_cloud.node_memory_capacity_bytes`)) FROM Metric FACET instance WHERE component = 'tidb' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiDB Memory Usage",
          "layout": {
            "column": 7,
            "row": 36,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_memory_used_bytes`) * cardinality(`tidb_cloud.node_memory_used_bytes`)) FROM Metric FACET instance WHERE component = 'tidb' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiDB Memory Available Size",
          "layout": {
            "column": 1,
            "row": 39,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_memory_available_bytes`) * cardinality(`tidb_cloud.node_memory_available_bytes`)) FROM Metric FACET instance WHERE component = 'tidb' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "TiKV Uptime",
          "layout": {
            "column": 1,
            "row": 42,
            "width": 12,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_component_uptime`) * cardinality(`tidb_cloud.db_component_uptime`)) FROM Metric WHERE (component = 'tikv') FACET instance SINCE 24 HOURS AGO TIMESERIES WHERE cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "SECONDS"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "TiKV CPU Capacity",
          "layout": {
            "column": 1,
            "row": 45,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_cpu_capacity_cores`) * cardinality(`tidb_cloud.node_cpu_capacity_cores`)) FROM Metric FACET instance WHERE (component = 'tikv') SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "PERCENTAGE"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiKV CPU Usage",
          "layout": {
            "column": 7,
            "row": 45,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_cpu_seconds_total_rate`) * cardinality(`tidb_cloud.node_cpu_seconds_total_rate`)) FROM Metric WHERE (component = 'tikv') SINCE 60 MINUTES AGO UNTIL NOW FACET instance LIMIT 100 TIMESERIES 120000 SLIDE BY 60000 WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "PERCENTAGE"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "TiKV Memory Capacity",
          "layout": {
            "column": 1,
            "row": 48,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_memory_capacity_bytes`) * cardinality(`tidb_cloud.node_memory_capacity_bytes`)) FROM Metric FACET instance WHERE component = 'tikv' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiKV Memory Usage",
          "layout": {
            "column": 7,
            "row": 48,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_memory_used_bytes`) * cardinality(`tidb_cloud.node_memory_used_bytes`)) FROM Metric FACET instance WHERE component = 'tikv' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiKV Memory Available Size",
          "layout": {
            "column": 1,
            "row": 51,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_memory_available_bytes`) * cardinality(`tidb_cloud.node_memory_available_bytes`)) FROM Metric FACET instance WHERE component = 'tikv' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "TiKV Storage Capacity",
          "layout": {
            "column": 7,
            "row": 51,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_storage_capacity_bytes`) * cardinality(`tidb_cloud.node_storage_capacity_bytes`)) FROM Metric FACET instance WHERE component = 'tikv' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiKV Storage Usage",
          "layout": {
            "column": 1,
            "row": 54,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_storage_used_bytes`) * cardinality(`tidb_cloud.node_storage_used_bytes`)) FROM Metric FACET instance WHERE component = 'tikv' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiKV Storage Available Size",
          "layout": {
            "column": 7,
            "row": 54,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_storage_available_bytes`) * cardinality(`tidb_cloud.node_storage_available_bytes`)) FROM Metric FACET instance WHERE component = 'tikv' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "TiFlash Uptime",
          "layout": {
            "column": 1,
            "row": 57,
            "width": 12,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.db_component_uptime`) * cardinality(`tidb_cloud.db_component_uptime`)) FROM Metric WHERE (component = 'tiflash') FACET instance SINCE 24 HOURS AGO TIMESERIES WHERE cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "SECONDS"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "TiFlash CPU Capacity",
          "layout": {
            "column": 1,
            "row": 60,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_cpu_capacity_cores`) * cardinality(`tidb_cloud.node_cpu_capacity_cores`)) FROM Metric FACET instance WHERE (component = 'tiflash') SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "PERCENTAGE"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiFlash CPU Usage",
          "layout": {
            "column": 7,
            "row": 60,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_cpu_seconds_total_rate`) * cardinality(`tidb_cloud.node_cpu_seconds_total_rate`)) FROM Metric WHERE (component = 'tiflash') SINCE 60 MINUTES AGO UNTIL NOW FACET instance LIMIT 100 TIMESERIES 120000 SLIDE BY 60000 WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "PERCENTAGE"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "TiFlash Memory Capacity",
          "layout": {
            "column": 1,
            "row": 63,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_memory_capacity_bytes`) * cardinality(`tidb_cloud.node_memory_capacity_bytes`)) FROM Metric FACET instance WHERE component = 'tiflash' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiFlash Memory Usage",
          "layout": {
            "column": 7,
            "row": 63,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_memory_used_bytes`) * cardinality(`tidb_cloud.node_memory_used_bytes`)) FROM Metric FACET instance WHERE component = 'tiflash' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiFlash Memory Available Size",
          "layout": {
            "column": 1,
            "row": 66,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_memory_available_bytes`) * cardinality(`tidb_cloud.node_memory_available_bytes`)) FROM Metric FACET instance WHERE component = 'tiflash' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "TiFlash Storage Capacity",
          "layout": {
            "column": 7,
            "row": 66,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_storage_capacity_bytes`) * cardinality(`tidb_cloud.node_storage_capacity_bytes`)) FROM Metric FACET instance WHERE component = 'tiflash' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiFlash Storage Usage",
          "layout": {
            "column": 1,
            "row": 69,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_storage_used_bytes`) * cardinality(`tidb_cloud.node_storage_used_bytes`)) FROM Metric FACET instance WHERE component = 'tiflash' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            }
          }
        },
        {
          "title": "TiFlash Storage Available Size",
          "layout": {
            "column": 7,
            "row": 69,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.node_storage_available_bytes`) * cardinality(`tidb_cloud.node_storage_available_bytes`)) FROM Metric FACET instance WHERE component = 'tiflash' SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}}) AND instance IN ({{instance}})"
              }
            ],
            "nullValues": {
              "nullValue": "remove"
            },
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "BYTES"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "",
          "layout": {
            "column": 1,
            "row": 72,
            "width": 12,
            "height": 1
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.markdown"
          },
          "rawConfiguration": {
            "text": "# Resource Control"
          }
        },
        {
          "title": "Resource Unit",
          "layout": {
            "column": 1,
            "row": 73,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.resource_manager_resource_unit_write_request_unit`) * cardinality(`tidb_cloud.resource_manager_resource_unit_write_request_unit`))AS 'RU write' FROM Metric SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}})"
              },
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.resource_manager_resource_unit_read_request_unit`) * cardinality(`tidb_cloud.resource_manager_resource_unit_read_request_unit`))AS 'RU read' FROM Metric SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "",
          "layout": {
            "column": 1,
            "row": 76,
            "width": 12,
            "height": 1
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.markdown"
          },
          "rawConfiguration": {
            "text": "# DM Panel"
          }
        },
        {
          "title": "DM Task State",
          "layout": {
            "column": 1,
            "row": 77,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.dm_task_state`) * cardinality(`tidb_cloud.dm_task_state`)) FROM Metric FACET instance SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "DM Fail to Read Binlog from Master",
          "layout": {
            "column": 7,
            "row": 77,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.dm_relay_read_error_count`) * cardinality(`tidb_cloud.dm_relay_read_error_count`)) FROM Metric FACET instance SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "DM Syncer Replication Lag Bucket",
          "layout": {
            "column": 1,
            "row": 80,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT \n  percentile(`tidb_cloud.dm_syncer_replication_lag_bucket`, 90) \nFROM Metric \nFACET tuple(task)\nSINCE 24 HOURS AGO \nTIMESERIES \nWHERE project_name IN ({{project_name}}) \n  AND cluster_id IN ({{cluster_id}}) \n  AND cluster_name IN ({{cluster_name}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "DM Syncer Replication Lag Gauge",
          "layout": {
            "column": 7,
            "row": 80,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.dm_syncer_replication_lag_gauge`) * cardinality(`tidb_cloud.dm_syncer_replication_lag_gauge`)) FROM Metric FACET task SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "",
          "layout": {
            "column": 1,
            "row": 83,
            "width": 12,
            "height": 1
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.markdown"
          },
          "rawConfiguration": {
            "text": "# Changefeed Panel"
          }
        },
        {
          "title": "Changefeed Resolved TS Lag",
          "layout": {
            "column": 1,
            "row": 84,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.cdc_changefeed_resolved_ts_lag`) * cardinality(`tidb_cloud.cdc_changefeed_resolved_ts_lag`)) FROM Metric FACET changefeed_id SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "SECONDS"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "Changefeed Checkpoint TS Lag",
          "layout": {
            "column": 7,
            "row": 84,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.cdc_changefeed_latency`) * cardinality(`tidb_cloud.cdc_changefeed_latency`)) FROM Metric FACET changefeed_id SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "SECONDS"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "Sink Flush Rows OPS",
          "layout": {
            "column": 1,
            "row": 87,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.cdc_changefeed_replica_rows`) * cardinality(`tidb_cloud.cdc_changefeed_replica_rows`)) FROM Metric FACET changefeed_id SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        },
        {
          "title": "The Status of Changefeed",
          "layout": {
            "column": 7,
            "row": 87,
            "width": 6,
            "height": 3
          },
          "linkedEntityGuids": null,
          "visualization": {
            "id": "viz.line"
          },
          "rawConfiguration": {
            "facet": {
              "showOtherSeries": false
            },
            "legend": {
              "enabled": true
            },
            "markers": {
              "displayedTypes": {
                "criticalViolations": false,
                "deployments": true,
                "relatedDeployments": true,
                "warningViolations": false
              }
            },
            "nrqlQueries": [
              {
                "accountIds": [],
                "query": "SELECT (average(`tidb_cloud.cdc_changefeed_status`) * cardinality(`tidb_cloud.cdc_changefeed_status`)) FROM Metric FACET tuple(changefeed_id) SINCE 24 HOURS AGO TIMESERIES WHERE project_name IN ({{project_name}}) AND cluster_id IN ({{cluster_id}}) AND cluster_name IN ({{cluster_name}})"
              }
            ],
            "platformOptions": {
              "ignoreTimeRange": false
            },
            "thresholds": {
              "isLabelVisible": true
            },
            "units": {
              "unit": "COUNT"
            },
            "yAxisLeft": {
              "zero": true
            },
            "yAxisRight": {
              "zero": true
            }
          }
        }
      ]
    }
  ],
  "variables": [
    {
      "name": "project_name",
      "items": null,
      "defaultValues": [
        {
          "value": {
            "string": "*"
          }
        }
      ],
      "nrqlQuery": {
        "accountIds": [],
        "query": "SELECT uniques(project_name) FROM Metric WHERE metricName='tidb_cloud.db_database_time'"
      },
      "options": {
        "ignoreTimeRange": false,
        "excluded": false
      },
      "title": "project_name",
      "type": "NRQL",
      "isMultiSelection": false,
      "replacementStrategy": "STRING"
    },
    {
      "name": "cluster_id",
      "items": null,
      "defaultValues": [
        {
          "value": {
            "string": "*"
          }
        }
      ],
      "nrqlQuery": {
        "accountIds": [],
        "query": "SELECT uniques(cluster_id) FROM Metric WHERE metricName='tidb_cloud.db_database_time'"
      },
      "options": {
        "ignoreTimeRange": false,
        "excluded": false
      },
      "title": "cluster_id",
      "type": "NRQL",
      "isMultiSelection": false,
      "replacementStrategy": "STRING"
    },
    {
      "name": "cluster_name",
      "items": null,
      "defaultValues": [
        {
          "value": {
            "string": "*"
          }
        }
      ],
      "nrqlQuery": {
        "accountIds": [],
        "query": "SELECT uniques(cluster_name) FROM Metric WHERE metricName='tidb_cloud.db_database_time'"
      },
      "options": {
        "ignoreTimeRange": false,
        "excluded": false
      },
      "title": "cluster_name",
      "type": "NRQL",
      "isMultiSelection": false,
      "replacementStrategy": "STRING"
    },
    {
      "name": "instance",
      "items": null,
      "defaultValues": [
        {
          "value": {
            "string": "*"
          }
        }
      ],
      "nrqlQuery": {
        "accountIds": [],
        "query": "SELECT uniques(instance) FROM Metric WHERE metricName='tidb_cloud.node_cpu_capacity_cores'"
      },
      "options": {
        "ignoreTimeRange": false,
        "excluded": false
      },
      "title": "instance",
      "type": "NRQL",
      "isMultiSelection": false,
      "replacementStrategy": "STRING"
    }
  ]
}
