Query Replication Task Metrics
Queries monitoring metrics of a specified replication task within a time range. The time range of a single query cannot exceed 1 day.
Request URL: /openapi/v1/replication/metrics/query
Request Method: GET
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| replicationId | String | Yes | Replication task ID. | rp-div0t0awwobr |
| metricsTypes | Array | Yes | Metric type list. See Metric Type Values. You can pass comma-separated values, such as metricsTypes=readRps,writeRps. | readRps,writeRps,replicationDelay,pendingRecords |
| beginMillis | Long | Yes | Query start time as a Unix timestamp in milliseconds. | 1780041679619 |
| endMillis | Long | Yes | Query end time as a Unix timestamp in milliseconds. | 1780045279619 |
Response Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | Whether the request was successful. | true |
| requestId | String | Request ID. | Nd7x4PFS-flmetNVneijx5SEdgme5SXN |
| data | Object | Metric query result. See data Fields. | See the example below |
data Fields
| Parameter | Type | Description | Example |
|---|---|---|---|
| replicationId | String | Replication task ID. | rp-div0t0awwobr |
| metricsValues | Array | Metric data points. Each element contains ts and the requested metric fields. Metric values are returned as numeric strings. | See the example below |
metricsValues Fields
| Parameter | Type | Description | Example |
|---|---|---|---|
| ts | Long | Data point time as a Unix timestamp in milliseconds. | 1780044000000 |
| readDelay | String | Read delay. Returned only when requested. | "0.0" |
| readThroughput | String | Read throughput. Returned only when requested. | "0.0" |
| readRps | String | Read RPS. Returned only when requested. | "0.0" |
| replicationDelay | String | Replication delay. Returned only when requested. | "0.0" |
| writeThroughput | String | Write throughput. Returned only when requested. | "0.0" |
| writeRps | String | Write RPS. Returned only when requested. | "0.0" |
| pendingRecords | String | Pending record count. Returned only when requested. | "0.0" |
Successful Invocation Example
{
"success": true,
"requestId": "Nd7x4PFS-flmetNVneijx5SEdgme5SXN",
"data": {
"replicationId": "rp-div0t0awwobr",
"metricsValues": [
{
"readRps": "0.0",
"ts": 1780043776000
},
{
"writeRps": "0.0",
"replicationDelay": "0.0",
"pendingRecords": "0.0",
"ts": 1780044000000
}
]
}
}
Metric Type Values
readDelay, readThroughput, readRps, replicationDelay, writeThroughput, writeRps, pendingRecords.