# release/20260320 Dedicated Metrics Output Baseline

## Datadog

| Common Resource Labels | Vector Behavior |
| --- | --- |
| `cluster_id`, `cluster_name`, `project_id`, `project_name` | add `host=tidbcloud.com`; add top-level `cluster_id` from `resource.cluster_id`; drop `tidb_cloud.node_cpu_seconds_total_rate` |

| metric_name | point labels | promql | status |
| --- | --- | --- | --- |
| `tidb_cloud.db_total_connection` | `cluster_name`, `instance`, `component`, `project_name` | `sum(tidb_server_connections{cluster_id=~".*<cluster_id>"}) by (component, instance)` | emitted |
| `tidb_cloud.db_active_connections` | `cluster_name`, `instance`, `component`, `project_name` | `sum(tidb_server_tokens{cluster_id=~".*<cluster_id>"}) by (component, instance)` | emitted |
| `tidb_cloud.db_disconnections` | `result`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_server_disconnection_total{cluster_id=~".*<cluster_id>"}[2m])) by (component, instance, result)` | emitted |
| `tidb_cloud.db_database_time` | `sql_type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_server_handle_query_duration_seconds_sum{cluster_id=~".*<cluster_id>", sql_type!="internal"}[2m])) by (component, instance, sql_type)` | emitted |
| `tidb_cloud.db_query_per_second` | `type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_executor_statement_total{cluster_id=~".*<cluster_id>"}[2m])) by (component, instance, type)` | emitted |
| `tidb_cloud.db_failed_queries` | `type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_server_execute_error_total{cluster_id=~".*<cluster_id>"}[2m])) by (component, instance, type)` | emitted |
| `tidb_cloud.db_command_per_second` | `type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_server_query_total{cluster_id=~".*<cluster_id>"}[2m])) by (component, instance, type)` | emitted |
| `tidb_cloud.db_queries_using_plan_cache_ops` | `type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_server_plan_cache_total{cluster_id=~".*<cluster_id>"}[2m])) by (component, instance, type)` | emitted |
| `tidb_cloud.db_average_query_duration` | `sql_type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_server_handle_query_duration_seconds_sum{cluster_id=~".*<cluster_id>", sql_type!="internal"}[2m])) by (component, instance, sql_type) / sum(rate(tidb_server_handle_query_duration_seconds_count{cluster_id=~".*<cluster_id>", sql_type!="internal"}[2m])) by (component, instance, sql_type) > 0` | emitted |
| `tidb_cloud.db_transaction_per_second` | `txn_mode`, `type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_session_transaction_duration_seconds_count{cluster_id=~".*<cluster_id>", scope=~"general"}[2m])) by (component, instance, type, txn_mode)` | emitted |
| `tidb_cloud.cdc_changefeed_latency` | `changefeed_id`, `cluster_name`, `instance`, `project_name` | `max by(changefeed) (ticdc_owner_checkpoint_ts_lag{cluster_id=~".*<cluster_id>", changefeed!=""})` | emitted |
| `tidb_cloud.cdc_changefeed_resolved_ts_lag` | `changefeed_id`, `cluster_name`, `instance`, `project_name` | `max by(changefeed) (ticdc_owner_resolved_ts_lag{cluster_id=~".*<cluster_id>", changefeed!=""})` | emitted |
| `tidb_cloud.cdc_changefeed_status` | `changefeed_id`, `cluster_name`, `instance`, `project_name` | `max by(changefeed) (ticdc_owner_status{cluster_id=~".*<cluster_id>", changefeed!=""})` | emitted |
| `tidb_cloud.cdc_changefeed_replica_rows` | `changefeed_id`, `cluster_name`, `instance`, `project_name` | `sum by(changefeed) (rate(ticdc_sink_total_flushed_rows_count{cluster_id=~".*<cluster_id>", changefeed!=""}[1m])) or sum by(changefeed) (rate(ticdc_sinkv2_batch_row_count_sum{cluster_id=~".*<cluster_id>", changefeed!=""}[1m])) or sum by(changefeed) (rate(ticdc_sink_batch_row_count_sum{cluster_id=~".*<cluster_id>", changefeed!=""}[1m]))` | emitted |
| `tidb_cloud.node_memory_capacity_bytes` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `node_memory_MemTotal_bytes{cluster_id="tidb<cluster_id>"}` | emitted |
| `tidb_cloud.node_memory_used_bytes` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `node_memory_MemTotal_bytes{cluster_id="tidb<cluster_id>"} - on(component, instance) node_memory_MemAvailable_bytes{cluster_id="tidb<cluster_id>"}` | emitted |
| `tidb_cloud.node_memory_available_bytes` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `node_memory_MemAvailable_bytes{cluster_id="tidb<cluster_id>"}` | emitted |
| `tidb_cloud.node_cpu_seconds_total` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `round(sum(node_cpu_seconds_total{cluster_id="tidb<cluster_id>", mode!= "idle"}) by (component, instance))` | emitted |
| `tidb_cloud.node_cpu_seconds_total_rate` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `sum(rate(node_cpu_seconds_total{mode!="idle", cluster_id="tidb<cluster_id>"}[120s])) by (component, instance)` | dropped by vector |
| `tidb_cloud.node_storage_capacity_bytes` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `tikv_store_size_bytes{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>",type="capacity"} or tiflash_system_current_metric_StoreSizeCapacity{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"}` | emitted |
| `tidb_cloud.node_storage_used_bytes` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `(tikv_store_size_bytes{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>",type="capacity"} - ignoring(type) tikv_store_size_bytes{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>",type="available"}) or (tiflash_system_current_metric_StoreSizeCapacity{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"} - tiflash_system_current_metric_StoreSizeAvailable{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"})` | emitted |
| `tidb_cloud.node_storage_available_bytes` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `tikv_store_size_bytes{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>",type="available"} or tiflash_system_current_metric_StoreSizeAvailable{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"}` | emitted |
| `tidb_cloud.db_component_uptime` | `cluster_name`, `instance`, `component`, `project_name` | `(time() - process_start_time_seconds{tidb_cluster_id=~".*<cluster_id>", component=~"(tidb|tikv)"}) or tiflash_system_asynchronous_metric_Uptime{cluster_id=~".*<cluster_id>"}` | emitted |
| `tidb_cloud.resource_manager_resource_unit_read_request_unit` | `resource_group`, `cluster_name`, `instance`, `project_name` | `rate(resource_manager_resource_unit_read_request_unit_sum{tidb_cluster_id=~".*<cluster_id>", type=~"|tp"}[2m])` | emitted |
| `tidb_cloud.resource_manager_resource_unit_write_request_unit` | `resource_group`, `cluster_name`, `instance`, `project_name` | `rate(resource_manager_resource_unit_write_request_unit_sum{tidb_cluster_id=~".*<cluster_id>", type=~"|tp"}[2m])` | emitted |
| `tidb_cloud.dm_task_state` | `task`, `job_id`, `cluster_name`, `instance`, `project_name` | `dm_worker_task_state{job_id=~""}` | emitted |
| `tidb_cloud.dm_syncer_replication_lag_bucket` | `task`, `job_id`, `cluster_name`, `instance`, `project_name` | `{__name__=~"dm_syncer_replication_lag_(bucket|sum|count)",job_id=~""}` | emitted |
| `tidb_cloud.dm_syncer_replication_lag_gauge` | `task`, `job_id`, `cluster_name`, `instance`, `project_name` | `dm_syncer_replication_lag_gauge{job_id=~""}` | emitted |
| `tidb_cloud.dm_relay_read_error_count` | `task`, `job_id`, `cluster_name`, `instance`, `project_name` | `dm_relay_read_error_count{job_id=~""}` | emitted |
| `tidb_cloud.db_kv_request_duration` | `type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_tikvclient_request_seconds_sum{store!="0", cluster_id=~".*<cluster_id>"}[2m])) by (instance, type) / sum(rate(tidb_tikvclient_request_seconds_count{store!="0", cluster_id=~".*<cluster_id>"}[2m])) by (instance, type)` | emitted |
| `tidb_cloud.node_disk_read_latency` | `cluster_name`, `instance`, `component`, `project_name`, `device` | `rate(node_disk_read_time_seconds_total{cluster_id=~".*<cluster_id>"}[2m]) / rate(node_disk_reads_completed_total{cluster_id=~".*<cluster_id>"}[2m])` | emitted |
| `tidb_cloud.node_disk_write_latency` | `cluster_name`, `instance`, `component`, `project_name`, `device` | `rate(node_disk_write_time_seconds_total{cluster_id=~".*<cluster_id>"}[2m]) / rate(node_disk_writes_completed_total{cluster_id=~".*<cluster_id>"}[2m])` | emitted |

## NewRelic

| Common Resource Labels | Vector Behavior |
| --- | --- |
| `cluster_id`, `cluster_name`, `project_id`, `project_name` | add top-level `cluster_id` from `resource.cluster_id`; drop `tidb_cloud.node_cpu_seconds_total` |

| metric_name | point labels | promql | status |
| --- | --- | --- | --- |
| `tidb_cloud.db_total_connection` | `cluster_name`, `instance`, `component`, `project_name` | `sum(tidb_server_connections{cluster_id=~".*<cluster_id>"}) by (component, instance)` | emitted |
| `tidb_cloud.db_active_connections` | `cluster_name`, `instance`, `component`, `project_name` | `sum(tidb_server_tokens{cluster_id=~".*<cluster_id>"}) by (component, instance)` | emitted |
| `tidb_cloud.db_disconnections` | `result`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_server_disconnection_total{cluster_id=~".*<cluster_id>"}[2m])) by (component, instance, result)` | emitted |
| `tidb_cloud.db_database_time` | `sql_type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_server_handle_query_duration_seconds_sum{cluster_id=~".*<cluster_id>", sql_type!="internal"}[2m])) by (component, instance, sql_type)` | emitted |
| `tidb_cloud.db_query_per_second` | `type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_executor_statement_total{cluster_id=~".*<cluster_id>"}[2m])) by (component, instance, type)` | emitted |
| `tidb_cloud.db_failed_queries` | `type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_server_execute_error_total{cluster_id=~".*<cluster_id>"}[2m])) by (component, instance, type)` | emitted |
| `tidb_cloud.db_command_per_second` | `type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_server_query_total{cluster_id=~".*<cluster_id>"}[2m])) by (component, instance, type)` | emitted |
| `tidb_cloud.db_queries_using_plan_cache_ops` | `type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_server_plan_cache_total{cluster_id=~".*<cluster_id>"}[2m])) by (component, instance, type)` | emitted |
| `tidb_cloud.db_average_query_duration` | `sql_type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_server_handle_query_duration_seconds_sum{cluster_id=~".*<cluster_id>", sql_type!="internal"}[2m])) by (component, instance, sql_type) / sum(rate(tidb_server_handle_query_duration_seconds_count{cluster_id=~".*<cluster_id>", sql_type!="internal"}[2m])) by (component, instance, sql_type) > 0` | emitted |
| `tidb_cloud.db_transaction_per_second` | `txn_mode`, `type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_session_transaction_duration_seconds_count{cluster_id=~".*<cluster_id>", scope=~"general"}[2m])) by (component, instance, type, txn_mode)` | emitted |
| `tidb_cloud.cdc_changefeed_latency` | `changefeed_id`, `cluster_name`, `instance`, `project_name` | `max by(changefeed) (ticdc_owner_checkpoint_ts_lag{cluster_id=~".*<cluster_id>", changefeed!=""})` | emitted |
| `tidb_cloud.cdc_changefeed_resolved_ts_lag` | `changefeed_id`, `cluster_name`, `instance`, `project_name` | `max by(changefeed) (ticdc_owner_resolved_ts_lag{cluster_id=~".*<cluster_id>", changefeed!=""})` | emitted |
| `tidb_cloud.cdc_changefeed_status` | `changefeed_id`, `cluster_name`, `instance`, `project_name` | `max by(changefeed) (ticdc_owner_status{cluster_id=~".*<cluster_id>", changefeed!=""})` | emitted |
| `tidb_cloud.cdc_changefeed_replica_rows` | `changefeed_id`, `cluster_name`, `instance`, `project_name` | `sum by(changefeed) (rate(ticdc_sink_total_flushed_rows_count{cluster_id=~".*<cluster_id>", changefeed!=""}[1m])) or sum by(changefeed) (rate(ticdc_sinkv2_batch_row_count_sum{cluster_id=~".*<cluster_id>", changefeed!=""}[1m])) or sum by(changefeed) (rate(ticdc_sink_batch_row_count_sum{cluster_id=~".*<cluster_id>", changefeed!=""}[1m]))` | emitted |
| `tidb_cloud.node_memory_capacity_bytes` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `node_memory_MemTotal_bytes{cluster_id="tidb<cluster_id>"}` | emitted |
| `tidb_cloud.node_memory_used_bytes` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `node_memory_MemTotal_bytes{cluster_id="tidb<cluster_id>"} - on(component, instance) node_memory_MemAvailable_bytes{cluster_id="tidb<cluster_id>"}` | emitted |
| `tidb_cloud.node_memory_available_bytes` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `node_memory_MemAvailable_bytes{cluster_id="tidb<cluster_id>"}` | emitted |
| `tidb_cloud.node_cpu_seconds_total` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `round(sum(node_cpu_seconds_total{cluster_id="tidb<cluster_id>", mode!= "idle"}) by (component, instance))` | dropped by vector |
| `tidb_cloud.node_cpu_seconds_total_rate` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `sum(rate(node_cpu_seconds_total{mode!="idle", cluster_id="tidb<cluster_id>"}[120s])) by (component, instance)` | emitted |
| `tidb_cloud.node_storage_capacity_bytes` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `tikv_store_size_bytes{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>",type="capacity"} or tiflash_system_current_metric_StoreSizeCapacity{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"}` | emitted |
| `tidb_cloud.node_storage_used_bytes` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `(tikv_store_size_bytes{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>",type="capacity"} - ignoring(type) tikv_store_size_bytes{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>",type="available"}) or (tiflash_system_current_metric_StoreSizeCapacity{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"} - tiflash_system_current_metric_StoreSizeAvailable{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"})` | emitted |
| `tidb_cloud.node_storage_available_bytes` | `cluster_name`, `cluster_id`, `instance`, `component`, `project_name` | `tikv_store_size_bytes{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>",type="available"} or tiflash_system_current_metric_StoreSizeAvailable{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"}` | emitted |
| `tidb_cloud.db_component_uptime` | `cluster_name`, `instance`, `component`, `project_name` | `(time() - process_start_time_seconds{tidb_cluster_id=~".*<cluster_id>", component=~"(tidb|tikv)"}) or tiflash_system_asynchronous_metric_Uptime{cluster_id=~".*<cluster_id>"}` | emitted |
| `tidb_cloud.resource_manager_resource_unit_read_request_unit` | `resource_group`, `cluster_name`, `instance`, `project_name` | `rate(resource_manager_resource_unit_read_request_unit_sum{tidb_cluster_id=~".*<cluster_id>", type=~"|tp"}[2m])` | emitted |
| `tidb_cloud.resource_manager_resource_unit_write_request_unit` | `resource_group`, `cluster_name`, `instance`, `project_name` | `rate(resource_manager_resource_unit_write_request_unit_sum{tidb_cluster_id=~".*<cluster_id>", type=~"|tp"}[2m])` | emitted |
| `tidb_cloud.dm_task_state` | `task`, `job_id`, `cluster_name`, `instance`, `project_name` | `dm_worker_task_state{job_id=~""}` | emitted |
| `tidb_cloud.dm_syncer_replication_lag_bucket` | `task`, `job_id`, `cluster_name`, `instance`, `project_name` | `{__name__=~"dm_syncer_replication_lag_(bucket|sum|count)",job_id=~""}` | emitted |
| `tidb_cloud.dm_syncer_replication_lag_gauge` | `task`, `job_id`, `cluster_name`, `instance`, `project_name` | `dm_syncer_replication_lag_gauge{job_id=~""}` | emitted |
| `tidb_cloud.dm_relay_read_error_count` | `task`, `job_id`, `cluster_name`, `instance`, `project_name` | `dm_relay_read_error_count{job_id=~""}` | emitted |
| `tidb_cloud.db_kv_request_duration` | `type`, `cluster_name`, `instance`, `component`, `project_name` | `sum(rate(tidb_tikvclient_request_seconds_sum{store!="0", cluster_id=~".*<cluster_id>"}[2m])) by (instance, type) / sum(rate(tidb_tikvclient_request_seconds_count{store!="0", cluster_id=~".*<cluster_id>"}[2m])) by (instance, type)` | emitted |
| `tidb_cloud.node_disk_read_latency` | `cluster_name`, `instance`, `component`, `project_name`, `device` | `rate(node_disk_read_time_seconds_total{cluster_id=~".*<cluster_id>"}[2m]) / rate(node_disk_reads_completed_total{cluster_id=~".*<cluster_id>"}[2m])` | emitted |
| `tidb_cloud.node_disk_write_latency` | `cluster_name`, `instance`, `component`, `project_name`, `device` | `rate(node_disk_write_time_seconds_total{cluster_id=~".*<cluster_id>"}[2m]) / rate(node_disk_writes_completed_total{cluster_id=~".*<cluster_id>"}[2m])` | emitted |

## Prometheus

| metric_name | labels | promql |
| --- | --- | --- |
| `tidbcloud_node_cpu_capacity_cores` | `instance`, `component`, `cluster_name`, `cluster_id`, `project_id` | `round(sum(node_cpu_seconds_total{cluster_id="tidb<cluster_id>", mode!= "idle"}) by (component, instance))` |
| `tidbcloud_node_cpu_seconds_total` | `instance`, `component`, `cluster_name`, `cluster_id`, `project_id` | `round(sum(node_cpu_seconds_total{cluster_id="tidb<cluster_id>", mode!= "idle"}) by (component, instance))` |
| `tidbcloud_node_memory_capacity_bytes` | `instance`, `component`, `cluster_name`, `cluster_id`, `project_id` | `node_memory_MemTotal_bytes{cluster_id="tidb<cluster_id>"}` |
| `tidbcloud_node_memory_used_bytes` | `instance`, `component`, `cluster_name`, `cluster_id`, `project_id` | `node_memory_MemTotal_bytes{cluster_id="tidb<cluster_id>"} - on(component, instance) node_memory_MemAvailable_bytes{cluster_id="tidb<cluster_id>"}` |
| `tidbcloud_node_storage_capacity_bytes` | `instance`, `component`, `cluster_name`, `cluster_id`, `project_id` | `tikv_store_size_bytes{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>",type="capacity"} or tiflash_system_current_metric_StoreSizeCapacity{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"}` |
| `tidbcloud_node_storage_used_bytes` | `instance`, `component`, `cluster_name`, `cluster_id`, `project_id` | `(tikv_store_size_bytes{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>",type="capacity"} - ignoring(type) tikv_store_size_bytes{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>",type="available"}) or (tiflash_system_current_metric_StoreSizeCapacity{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"} - tiflash_system_current_metric_StoreSizeAvailable{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"})` |
| `tidbcloud_node_storage_available_bytes` | `instance`, `component`, `cluster_name`, `cluster_id`, `project_id` | `tikv_store_size_bytes{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>",type="available"} or tiflash_system_current_metric_StoreSizeAvailable{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"}` |
| `tidbcloud_kv_request_duration` | `type`, `instance`, `component`, `cluster_name`, `cluster_id`, `project_id` | `sum(rate(tidb_tikvclient_request_seconds_sum{store!="0", cluster_id=~".*<cluster_id>"}[2m])) by (instance, type) / sum(rate(tidb_tikvclient_request_seconds_count{store!="0", cluster_id=~".*<cluster_id>"}[2m])) by (instance, type)` |
| `tidbcloud_component_uptime` | `instance`, `component`, `cluster_name`, `cluster_id`, `project_id` | `(time() - process_start_time_seconds{tidb_cluster_id=~".*<cluster_id>", component=~"(tidb|tikv)"}) or tiflash_system_asynchronous_metric_Uptime{cluster_id=~".*<cluster_id>"}` |
| `tidbcloud_disk_read_latency` | `instance`, `component`, `cluster_name`, `cluster_id`, `project_id`, `device` | `rate(node_disk_read_time_seconds_total{cluster_id=~".*<cluster_id>"}[2m]) / rate(node_disk_reads_completed_total{cluster_id=~".*<cluster_id>"}[2m])` |
| `tidbcloud_disk_write_latency` | `instance`, `component`, `cluster_name`, `cluster_id`, `project_id`, `device` | `rate(node_disk_write_time_seconds_total{cluster_id=~".*<cluster_id>"}[2m]) / rate(node_disk_writes_completed_total{cluster_id=~".*<cluster_id>"}[2m])` |
| `tidbcloud_db_connections` | `instance`, `component`, `cluster_name`, `cluster_id`, `project_id` | `tidb_server_connections{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"}` |
| `tidbcloud_db_failed_queries_total` | `type`, `instance`, `component`, `cluster_name`, `cluster_id`, `project_id` | `tidb_server_execute_error_total{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"}` |
| `tidbcloud_db_queries_total` | `sql_type`, `resource_group`, `instance`, `component`, `cluster_name`, `cluster_id`, `project_id` | `tidb_executor_statement_total{instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"}` |
| `tidbcloud_db_query_duration_seconds` | `sql_type`, `resource_group`, `instance`, `component`, `cluster_name`, `cluster_id`, `project_id`; bucket series add `le` | `{__name__=~"tidb_server_handle_query_duration_seconds.+",instance=~"db-.*",kubernetes_namespace="tidb<cluster_id>"}` |
| `tidbcloud_ticdc_owner_resolved_ts_lag` | `changefeed_id`, `cluster_name`, `cluster_id`, `project_id` | `max by(changefeed) (ticdc_owner_resolved_ts_lag{cluster_id=~".*<cluster_id>", changefeed!=""})` |
| `tidbcloud_changefeed_latency` | `changefeed_id`, `cluster_name`, `cluster_id`, `project_id` | `max by(changefeed) (ticdc_owner_checkpoint_ts_lag{cluster_id=~".*<cluster_id>", changefeed!=""})` |
| `tidbcloud_changefeed_checkpoint_ts` | `changefeed_id`, `cluster_name`, `cluster_id`, `project_id` | `max by(changefeed) (ticdc_owner_checkpoint_ts{cluster_id=~".*<cluster_id>", changefeed!=""})` |
| `tidbcloud_changefeed_status` | `changefeed_id`, `cluster_name`, `cluster_id`, `project_id` | `max by(changefeed) (ticdc_owner_status{cluster_id=~".*<cluster_id>", changefeed!=""})` |
| `tidbcloud_changefeed_Replica_rows` | `changefeed_id`, `cluster_name`, `cluster_id`, `project_id` | `sum by(changefeed) (rate(ticdc_sink_total_flushed_rows_count{cluster_id=~".*<cluster_id>", changefeed!=""}[1m])) or sum by(changefeed) (rate(ticdc_sinkv2_batch_row_count_sum{cluster_id=~".*<cluster_id>", changefeed!=""}[1m])) or sum by(changefeed) (rate(ticdc_sink_batch_row_count_sum{cluster_id=~".*<cluster_id>", changefeed!=""}[1m]))` |
| `tidbcloud_resource_manager_resource_unit_read_request_unit` | `cluster_name`, `cluster_id`, `project_id`, `resource_group` | `rate(resource_manager_resource_unit_read_request_unit_sum{tidb_cluster_id=~".*<cluster_id>", type=~"|tp"}[2m])` |
| `tidbcloud_resource_manager_resource_unit_write_request_unit` | `cluster_name`, `cluster_id`, `project_id`, `resource_group` | `rate(resource_manager_resource_unit_write_request_unit_sum{tidb_cluster_id=~".*<cluster_id>", type=~"|tp"}[2m])` |
| `tidbcloud_dm_relay_read_error_count` | `cluster_name`, `cluster_id`, `project_id`, `job_id`, `task` | `dm_relay_read_error_count{job_id=~""}` |
| `tidbcloud_dm_syncer_replication_lag` | `cluster_name`, `cluster_id`, `project_id`, `job_id`, `task`; bucket series add `le` | `{__name__=~"dm_syncer_replication_lag_(bucket|sum|count)",job_id=~""}` |
| `tidbcloud_dm_syncer_replication_lag_gauge` | `cluster_name`, `cluster_id`, `project_id`, `job_id`, `task` | `dm_syncer_replication_lag_gauge{job_id=~""}` |
| `tidbcloud_dm_task_status` | `cluster_name`, `cluster_id`, `project_id`, `job_id`, `task` | `dm_worker_task_state{job_id=~""}` |
