---
title: "DescribeMetricsData - 查询监控指标数据 - OB Cloud 云数据库 master | OceanBase 文档中心"
description: DescribeMetricsData - 查询监控指标数据 功能说明 该接口用于查询 OceanBase 集群的单维度或者多维度监控指标数据。 调用说明 接口约束 调用者需要拥有访问多云 API 的密钥。AccessKey ID、AccessKey Secret 的获取方式，详情参见 访问密钥管理 。 请求路径 P…
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*qbZXRo_94ZEAAAAAAAAAAAAADiGDAQ/original) OB Cloud 云数据库

# DescribeMetricsData - 查询监控指标数据

更新时间：2026-06-19 11:07:29

## 功能说明

该接口用于查询 OceanBase 集群的单维度或者多维度监控指标数据。

## 调用说明

### 接口约束

调用者需要拥有访问多云 API 的密钥。AccessKey ID、AccessKey Secret 的获取方式，详情参见[访问密钥管理](https://www.oceanbase.com/docs/common-oceanbase-cloud-0000000002295194)。

### 请求路径

`POST /api/v2/services/DescribeMetricsData`

### 请求参数

### Body

| 名称 | 类型 | 必填 | 描述 | 示例值 |
| --- | --- | --- | --- | --- |
| instanceId | string | 是 | OB Cloud 云数据库实例 ID。 | ob317v4uif**** |
| startTime | string | 是 | 监控数据的起始时间。 该时间只支持 UTC 时间，格式为：YYYY-MM-DDThh:mm:ssZ。 | 2021-06-13T15:40:43Z |
| endTime | string | 是 | 监控数据的结束时间。该时间只支持 UTC 时间，格式为：YYYY-MM-DDThh:mm:ssZ。 | 2021-09-13T15:40:43Z |
| metrics | List | 是 | 指标名。 | toal_sessions_tenant |
| tenantIdList | List | 否 | 租户 ID 列表。 | t4tx6u5tc**** |
| nodeIdList | List | 否 | 节点 ID 列表。 | i-0104c6fb57e6e**** |
| labels | string | 是 | 一组 kv 组成的字符串，key、value 之间用 `:` 分隔，kv 对之间用 `,` 分隔。例如："app:OB,clusterId:ob*****,tenantId:t******,serverId:*****,zoneId:cn-hangzhou-j"。k 为固定字段：   - app：表示应用类型，目前仅支持 OceanBase。 - clusterId：表示 OB Cloud 云数据库实例 ID。 - tenantId：表示 OceanBase 租户 ID。 - zoneId：表示 ob zone id。 - serverId：表示 OBServer 节点 ID。 | app:OB,clusterId:ob*** |
| groupByLabels | string | 是 | 用于分组的字段。多个字段之间用逗号分隔。例如："app,clusterId,tenantId"。 | app,clusterId |
| sortMetricKey | string | 否 | 排序列。 | tps |
| sortOrder | string | 否 | 排序规则。   - 升序：ASC - 降序：DESC。 | DESC |
| limit | string | 否 | 排序后返回的 Data 数组长度。 | 5 |

### 返回结果

| 名称 | 类型 | 描述 | 示例值 |
| --- | --- | --- | --- |
| tenantId | string | 租户 ID。 | sys |
| data | List | 租户指标信息。 | [ {"sql_all_count":16.39, "timestamp":1698217920},{"sql_all_count":16.11,"timestamp":1698214980},{"sql_all_count":16.43,"timestamp":1698216900}],"clusterId":"ob568006pe74kg"}, ...... ] |

## 示例

### 请求示例

```shell
curl  --digest   -u 'AccessKeyID:AccessKeySecret' \
  --request POST \
  --url   https://api-cloud-cn.oceanbase.com/api/v2/services/DescribeMetricsData\
  -H 'X-Ob-Project-Id: <项目 ID>'
  --data \
'{"InstanceId":"obmt5344s5grrpcw","StartTime":"2023-10-24T20:51:40Z","EndTime":"2023-10-25T02:51:40Z","Metrics":"sql_all_rt,sql_delete_rt,sql_insert_rt,sql_other_rt,sql_replace_rt,sql_select_rt,sql_update_rt","Labels":"clusterId:obmt5344s5grrpcw,tenantId:obmt5344s5grrpcw","GroupByLabels":"clusterId,tenantId"}'

```

#### 说明

- 项目 ID 是项目的唯一标识，您可以参考 [项目管理](https://www.oceanbase.com/docs/common-oceanbase-cloud-1000000000703404) 获取集群的项目 ID。
 - 请确保 instanceId 所属项目的 ID 和指定项目 ID 一致。

### 返回示例

`JSON` 格式

```java
{
    "Code":200,
    "Cost":91,
    "Data":[
        {
            "tenantId":"sys",
            "Data":[
                {
                    "sql_all_count":16.39,
                    "timestamp":1698217920
                },
                {
                    "sql_all_count":16.11,
                    "timestamp":1698214980
                },
                {
                    "sql_all_count":16.43,
                    "timestamp":1698216900
                }
            ],
            "clusterId":"ob****06pe74kg"
        },
        {
            "tenantId":"t****h898auo0",
            "Data":[

                {
                    "sql_all_count":0.0,
                    "timestamp":1698217920
                },
                {
                    "sql_all_count":0.0,
                    "timestamp":1698214980
                },
                {
                    "sql_all_count":0.0,
                    "timestamp":1698216900
                }
            ],
            "clusterId":"ob****06pe74kg"
        }
    ],
    "Deletable":false,
    "ErrorCode":"",
    "Message":"successful",
    "RequestId":"",
    "Success":true,
    "Trace":"6F95****-2961-4CEB-****-717E22A5****"
}

```

## 集群监控指标支持列表

| 指标名称 | 描述 | 单位 | 支持维度 |
| --- | --- | --- | --- |
| sql_all_count | 每秒处理 SQL 语句数 | times/s | ClusterId、ServerId |
| sql_delete_count | 每秒处理 Delete 语句数 | times/s | ClusterId、ServerId |
| sql_insert_count | 每秒处理 Insert 语句数 | times/s | ClusterId、ServerId |
| sql_replace_count | 每秒处理 Replace 语句数 | times/s | ClusterId、ServerId |
| sql_select_count | 每秒处理 Select 语句数 | times/s | ClusterId、ServerId |
| sql_update_count | 每秒处理 Update 语句数 | times/s | ClusterId、ServerId |
| sql_all_rt | SQL 语句平均处理耗时 | ms | ClusterId、ServerId |
| sql_delete_rt | Delete 语句平均处理耗时 | ms | ClusterId、ServerId |
| sql_insert_rt | Insert 语句平均处理耗时 | ms | ClusterId、ServerId |
| sql_other_rt | DDL、DCL、DTL 等其他语句平均处理耗时 | ms | ClusterId、ServerId |
| sql_replace_rt | Replace 语句平均处理耗时 | ms | ClusterId、ServerId |
| sql_select_rt | Select 语句平均处理耗时 | ms | ClusterId、ServerId |
| sql_update_rt | Update 语句平均处理耗时 | ms | ClusterId、ServerId |
| transaction_commit_count | 每秒提交事务数 | times/s | ClusterId、ServerId |
| transaction_count | 每秒处理事务数 | times/s | ClusterId、ServerId |
| transaction_rollback_count | 每秒回滚事务数 | times/s | ClusterId、ServerId |
| transaction_timeout_count | 每秒超时事务数 | times/s | ClusterId、ServerId |
| transaction_commit_rt | 事务平均提交耗时 | ms | ClusterId、ServerId |
| transaction_rollback_rt | 事务平均回滚耗时 | ms | ClusterId、ServerId |
| transaction_rt | 事务平均处理耗时 | ms | ClusterId、ServerId |
| active_session | 当前活跃会话数 | - | ClusterId、ServerId |
| all_session | 当前会话数 | - | ClusterId、ServerId |
| request_queue_time | SQL 在等待队列中等待耗时 | μs | ClusterId、ServerId |
| trans_commit_log_count | 每秒提交的事务日志数 | times/s | ClusterId、ServerId |
| clog_trans_log_total_size | 每秒提交的事务日志大小 | byte | ClusterId、ServerId |
| io_count | SSStore 每秒 IO 次数 | times/s | ClusterId、ServerId |
| io_read_count | SSStore 每秒读次数 | times/s | ClusterId、ServerId |
| io_write_count | SSStore 每秒写次数 | times/s | ClusterId、ServerId |
| io_read_rt | SSStore 每次读取平均耗时 | μs | ClusterId、ServerId |
| io_rt | IO 耗时 | μs | ClusterId、ServerId |
| io_write_rt | SSStore 每次写入平均耗时 | μs | ClusterId、ServerId |
| io_read_size | SSStore 每秒读取数据量 | byte | ClusterId、ServerId |
| io_size | SSStore 每秒处理数据量 | byte | ClusterId、ServerId |
| io_write_size | SSStore 每秒写入数据量 | byte | ClusterId、ServerId |
| transaction_multi_partition_count | 每秒分布式事务数 | times/s | ClusterId、ServerId |
| transaction_partition_count | 每秒事务数 | times/s | ClusterId、ServerId |
| transaction_single_partition_count | 每秒普通事务数 | times/s | ClusterId、ServerId |
| trans_commit_log_sync_rt | 每次事务日志网络同步平均耗时 | μs | ClusterId、ServerId |
| load1 | 过去 1 分钟系统平均负载 | - | ClusterId、ServerId |
| load15 | 过去 15 分钟系统平均负载 | - | ClusterId、ServerId |
| load5 | 过去 5 分钟系统平均负载 | - | ClusterId、ServerId |
| cpu_percent | CPU 使用率 | 百分比（%） | ClusterId、ServerId |
| memory_buffers | 内核 Buffer Cache 大小 | GiB | ClusterId、ServerId |
| memory_cached | 缓存使用的内存 | GiB | ClusterId、ServerId |
| memory_free | 可用物理内存大小 | GiB | ClusterId、ServerId |
| memory_used | 使用物理内存大小 | GiB | ClusterId、ServerId |
| io | 平均每秒 IO 次数 | times/s | ClusterId、ServerId |
| io_read | 每秒读次数 | times/s | ClusterId、ServerId |
| io_write | 每秒写次数 | times/s | ClusterId、ServerId |
| io_read_time | 平均每次 IO 读取耗时 | ms | ClusterId、ServerId |
| io_time | IO 耗时 | ms | ClusterId、ServerId |
| io_write_time | 平均每次 IO 写入耗时 | ms | ClusterId、ServerId |
| io_byte | 平均每秒 IO 数据量 | MiB | ClusterId、ServerId |
| io_read_byte | 每次读取数据量 | MiB | ClusterId、ServerId |
| io_write_byte | 每次写入数据量 | MiB | ClusterId、ServerId |
| net_recv | 每秒接收数据量 | MiB | ClusterId、ServerId |
| net_send | 每秒发送数据量 | MiB | ClusterId、ServerId |
| net_throughput | 网络吞吐量 | MiB | ClusterId、ServerId |
| ntp_offset_milliseconds | ntp 时钟偏移 | ms | ClusterId、ServerId |
| ob_data_disk_percent | OB 数据盘使用率 | 百分比（%） | ClusterId、ServerId |
| ob_clog_disk_percent | OB 日志盘使用率 | 百分比（%） | ClusterId、ServerId |
| ob_data_disk_used_size | OB 数据盘使用量 | GiB | ClusterId、ServerId |
| ob_process_exists | OB 进程存活状态 | - | ClusterId、ServerId |

## 租户监控指标支持列表

| 指标名称 | 描述 | 单位 | 支持维度 |
| --- | --- | --- | --- |
| sql_all_count | 每秒处理 SQL 语句数 | times/s | ClusterId、TenantId、ServerId |
| sql_delete_count | 每秒处理 Delete 语句数 | times/s | ClusterId、TenantId、ServerId |
| sql_insert_count | 每秒处理 Insert 语句数 | times/s | ClusterId、TenantId、ServerId |
| sql_other_count | DDL、DCL、DTL 等其他语句数 | times/s | ClusterId、TenantId、ServerId |
| sql_replace_count | 每秒处理 Replace 语句数 | times/s | ClusterId、TenantId、ServerId |
| sql_select_count | 每秒处理 Select 语句数 | times/s | ClusterId、TenantId、ServerId |
| sql_update_count | 每秒处理 Update 语句数 | times/s | ClusterId、TenantId、ServerId |
| sql_all_rt | SQL 语句平均处理耗时 | ms | ClusterId、TenantId、ServerId |
| sql_delete_rt | Delete 语句平均处理耗时 | ms | ClusterId、TenantId、ServerId |
| sql_insert_rt | Insert 语句平均处理耗时 | ms | ClusterId、TenantId、ServerId |
| sql_other_rt | DDL、DCL、DTL 等其他语句平均处理耗时 | ms | ClusterId、TenantId、ServerId |
| sql_replace_rt | Replace 语句平均处理耗时 | ms | ClusterId、TenantId、ServerId |
| sql_select_rt | Select 语句平均处理耗时 | ms | ClusterId、TenantId、ServerId |
| sql_update_rt | Update 语句平均处理耗时 | ms | ClusterId、TenantId、ServerId |
| active_session | 当前活跃会话数 | - | ClusterId、TenantId、ServerId |
| all_session | 当前会话数 | - | ClusterId、TenantId、ServerId |
| sql_distributed_count | 每秒处理分布式执行计划数 | times/s | ClusterId、TenantId、ServerId |
| sql_local_count | 每秒处理本地执行数 | times/s | ClusterId、TenantId、ServerId |
| sql_remote_count | 每秒处理远程执行计划数 | times/s | ClusterId、TenantId、ServerId |
| system_event_internal_total_waits | 每秒内部等待事件次数 | times/s | ClusterId、TenantId、ServerId |
| system_event_io_total_waits | 每秒 IO 等待事件次数 | times/s | ClusterId、TenantId、ServerId |
| system_event_latch_total_waits | 每秒 latch 等待事件次数 | times/s | ClusterId、TenantId、ServerId |
| system_event_other_total_waits | 每秒其他等待事件次数 | times/s | ClusterId、TenantId、ServerId |
| system_event_row_lock_wait_total_waits | 锁等待时间平均耗时 | ms | ClusterId、TenantId、ServerId |
| system_event_sync_rpc_total_waits | 同步 RPC 等待事件平均耗时 | ms | ClusterId、TenantId、ServerId |
| wait_event_count | 每秒等待事件次数 | times/s | ClusterId、TenantId、ServerId |
| system_event_internal_time_waited | 内部等待事件平均耗时 | ms | ClusterId、TenantId、ServerId |
| wait_event_rt | 等待事件平均耗时 | ms | ClusterId、TenantId、ServerId |
| request_dequeue_count | 从处理队列出队的请求数量 | times/s | ClusterId、TenantId、ServerId |
| request_enqueue_count | 进入处理队列的请求数量 | times/s | ClusterId、TenantId、ServerId |
| request_queue_time | SQL 在等待队列中等待耗时 | μ s | ClusterId、TenantId、ServerId |
| ob_cpu_percent | CPU 使用率 | 百分比（%） | ClusterId、TenantId、ServerId |
| memstore_percent | MEMStore 使用百分比 | 百分比（%） | ClusterId、TenantId、ServerId |
| rpc_packet_in_rt | Rpc 收包平均耗时 | μs | ClusterId、TenantId、ServerId |
| rpc_packet_out_rt | Rpc 发包平均耗时 | μs | ClusterId、TenantId、ServerId |
| rpc_packet_in | Rpc 收包吞吐量 | byte | ClusterId、TenantId、ServerId |
| rpc_packet_out | Rpc 发包吞吐量 | byte | ClusterId、TenantId、ServerId |
| opened_cursors_count | 打开的游标数 | times/s | ClusterId、TenantId、ServerId |
| transaction_commit_count | 每秒提交事务数 | times/s | ClusterId、TenantId、ServerId |
| transaction_count | 每秒处理事务数 | times/s | ClusterId、TenantId、ServerId |
| transaction_rollback_count | 每秒回滚事务数 | times/s | ClusterId、TenantId、ServerId |
| transaction_timeout_count | 每秒超时事务数 | times/s | ClusterId、TenantId、ServerId |
| transaction_commit_rt | 事务平均提交耗时 | ms | ClusterId、TenantId、ServerId |
| transaction_rollback_rt | 事务平均回滚耗时 | ms | ClusterId、TenantId、ServerId |
| transaction_rt | 事务平均处理耗时 | ms | ClusterId、TenantId、ServerId |
| trans_commit_log_count | 每秒提交的事务日志数 | times/s | ClusterId、TenantId、ServerId |
| clog_trans_log_total_size | 每秒提交的事务日志大小 | byte | ClusterId、TenantId、ServerId |
| memstore_write_lock_fail_count | 写锁等待失败次数 | times/s | ClusterId、TenantId、ServerId |
| memstore_write_lock_succ_count | 写锁等待成功次数 | times/s | ClusterId、TenantId、ServerId |
| memstore_write_lock_wait_time | 写锁平均等待耗时 | μs | ClusterId、TenantId、ServerId |
| transaction_multi_partition_count | 每秒分布式事务数 | times/s | ClusterId、TenantId、ServerId |
| transaction_single_partition_count | 每秒普通事务数 | times/s | ClusterId、TenantId、ServerId |
| trans_commit_log_sync_rt | 每次事务日志网络同步平均耗时 | μs | ClusterId、TenantId、ServerId |
| active_memstore_used | 活跃 MEMStore 大小 | MiB | ClusterId、TenantId、ServerId |
| major_freeze_trigger | 触发合并阈值 | MiB | ClusterId、TenantId、ServerId |
| memstore_limit | MEMStore 的 limit | MiB | ClusterId、TenantId、ServerId |
| total_memstore_used | MEMStore 总大小 | MiB | ClusterId、TenantId、ServerId |
| io_read_count | SSStore 每秒读次数 | times/s | ClusterId、TenantId、ServerId |
| io_write_count | SSStore 每秒写次数 | times/s | ClusterId、TenantId、ServerId |
| io_read_rt | SSStore 每次读取平均耗时 | μs | ClusterId、TenantId、ServerId |
| io_write_rt | SSStore 每次写入平均耗时 | μs | ClusterId、TenantId、ServerId |
| io_read_size | SSStore 每秒读取数据量 | byte | ClusterId、TenantId、ServerId |
| io_write_size | SSStore 每秒写入数据量 | byte | ClusterId、TenantId、ServerId |
| bloom_filter_cache_size | bloom filter 缓存大小 | MiB | ClusterId、TenantId、ServerId |
| clog_cache_size | Clog 缓存大小 | MiB | ClusterId、TenantId、ServerId |
| location_cache_size | location 缓存大小 | MiB | ClusterId、TenantId、ServerId |
| plan_cache_size | 执行计划缓存大小 | MiB | ClusterId、TenantId、ServerId |
| row_cache_size | 行缓存大小 | MiB | ClusterId、TenantId、ServerId |
| block_cache_hit_ratio | 块缓存命中率 | 百分比（%） | ClusterId、TenantId、ServerId |
| bloom_filter_cache_hit_ratio | bloom filter 缓存命中率 | 百分比（%） | ClusterId、TenantId、ServerId |
| clog_cache_hit_ratio | Clog 缓存命中率 | 百分比（%） | ClusterId、TenantId、ServerId |
| location_cache_hit_ratio | location 缓存命中率 | 百分比（%） | ClusterId、TenantId、ServerId |
| plan_cache_hit_ratio | 执行计划缓存命中率 | 百分比（%） | ClusterId、TenantId、ServerId |
| row_cache_hit_ratio | 行缓存命中率 | 百分比（%） | ClusterId、TenantId、ServerId |
| block_cache_req_total | 块缓存请求次数 | times/s | ClusterId、TenantId、ServerId |
| bloom_filter_cache_req_total | bloom filter 缓存请求次数 | times/s | ClusterId、TenantId、ServerId |
| clog_cache_req_total | Clog 缓存请求次数 | times/s | ClusterId、TenantId、ServerId |
| location_cache_req_total | location 缓存请求次数 | times/s | ClusterId、TenantId、ServerId |
| row_cache_req_total | 行缓存请求次数 | times/s | ClusterId、TenantId、ServerId |
| ob_tenant_binlog_disk_used | binlog日志磁盘使用量 | GiB | ClusterId、TenantId、ServerId |

 上一篇 下一篇 ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
