Query Task Metrics
Use this API to query monitoring metrics for a data replication task or a data comparison task. Select the metric names that match the task type you are monitoring.
Request URL: /openapi/v1/metrics/query
Request Method: POST
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| metrics | Array | Yes | List of metric names. Different task types support different metrics. Multiple metric names are supported in one request. | ["replicationThroughput", "replicationRps", "replicationDelay"] |
| taskId | String | Yes | Task ID. Pass a replication task ID for replication scenarios, or a data comparison task ID for comparison scenarios. | rp-di3twoi1mjzx |
| taskType | String | Yes | Task type. Optional values: replication, dataCompare. | replication |
| startTime | String | Yes | Query start time in UTC. The format must be ISO 8601, for example 2026-04-27T00:00:00Z. | 2026-04-27T00:00:00Z |
| endTime | String | Yes | Query end time in UTC. The format must be ISO 8601, for example 2026-04-28T08:00:00Z. | 2026-04-28T08:00:00Z |
Metric Names
Data replication tasks
| Metric | Description |
|---|---|
| replicationThroughput | Replication throughput, the amount of data processed per second. |
| replicationRps | Replication RPS, the number of records migrated to the target instance per second. |
| readThroughput | Read throughput, the amount of data read from the source instance per second. |
| readRps | Read RPS, the number of records read from the source instance per second. |
| replicationDelay | Replication delay, end-to-end delay across the full link. |
| queueAccumulation | Number of accumulated records in the queue. |
| writeThroughput | Write throughput. |
| writeRps | Write RPS. |
| readDelay | Read delay. |
Data replication metric aliases
Some integration scenarios can also use the metric names in this table. The returned metric field names are consistent with the metric names passed in the request.
| Metric | Description |
|---|---|
| ReaderLatency | Read latency. |
| ReplicationLatency | Replication delay. |
| ReaderThroughput | Read throughput, the amount of data read from the source instance per second. |
| ReplicationThroughput | Replication throughput, the amount of data replicated to the target instance per second. |
| ReaderRPS | Read RPS, the number of records read from the source instance per second. |
| WriterRPS | Write RPS, the number of records written to the target instance per second. |
| PendingRecords | Number of accumulated records. |
Data comparison tasks
| Metric | Description |
|---|---|
| compareRps | Comparison RPS. |
Request Example
{
"taskId": "rp-di3twoi1mjzx",
"taskType": "replication",
"metrics": [
"replicationThroughput",
"replicationRps",
"replicationDelay"
],
"startTime": "2026-04-27T00:00:00Z",
"endTime": "2026-04-28T08:00:00Z"
}
Response Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | Whether the request is successful. | true |
| requestId | String | Request ID. | Ik5z4TZX-flllvBUnhkga4PMdggi6PND |
| data | Array | List of metric results. Each element contains the time field and the metric value fields returned in this request. | { "replicationThroughput": "2222435.3", "replicationRps": "11670.9", "time": "2026-04-27 09:46:40Z" } |
Successful Invocation Example
{
"success": true,
"requestId": "Ik5z4TZX-flllvBUnhkga4PMdggi6PND",
"data": [
{
"replicationThroughput": "2222435.3",
"replicationRps": "11670.9",
"time": "2026-04-27 09:46:40Z"
},
{
"replicationThroughput": "5014587.6",
"replicationRps": "26237.8",
"time": "2026-04-27 10:10:00Z"
},
{
"time": "2026-04-27 10:52:30Z",
"replicationDelay": "1899538.8"
},
{
"time": "2026-04-28 04:07:30Z",
"replicationDelay": "32964161.2"
},
{
"time": "2026-04-28 04:30:00Z",
"replicationDelay": "0.0"
},
{
"time": "2026-04-28 04:52:30Z",
"replicationDelay": "0.0"
},
{
"time": "2026-04-28 05:15:00Z",
"replicationDelay": "0.0"
},
{
"time": "2026-04-28 05:37:30Z",
"replicationDelay": "5.3"
},
{
"time": "2026-04-28 06:00:00Z",
"replicationDelay": "14.2"
},
{
"time": "2026-04-28 06:22:30Z",
"replicationDelay": "0.0"
},
{
"time": "2026-04-28 06:45:00Z",
"replicationDelay": "0.0"
},
{
"time": "2026-04-28 07:07:30Z",
"replicationDelay": "88162.2"
},
{
"time": "2026-04-28 07:30:00Z",
"replicationDelay": "580880.6"
},
{
"time": "2026-04-28 07:52:30Z",
"replicationDelay": "0.0"
}
]
}
Result
A successful response returns time-series metric records for the requested task and metric names. The returned metric fields match the metric names passed in the request.