Skip to main content

Query Replication Task Metrics

Use this API to query monitoring metrics for 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

ParameterTypeRequiredDescriptionExample
replicationIdStringYesReplication task ID.rp-div0t0awwobr
metricsTypesArrayYesMetric type list. See Metric Type Values. Pass comma-separated values, such as metricsTypes=readRps,writeRps.readRps,writeRps,replicationDelay,pendingRecords
beginMillisLongYesQuery start time as a Unix timestamp in milliseconds.1780041679619
endMillisLongYesQuery end time as a Unix timestamp in milliseconds.1780045279619

Response Parameters

ParameterTypeDescriptionExample
successBooleanWhether the request was successful.true
requestIdStringRequest ID.Nd7x4PFS-flmetNVneijx5SEdgme5SXN
dataObjectMetric query result. See data Fields.See the example below

data Fields

ParameterTypeDescriptionExample
replicationIdStringReplication task ID.rp-div0t0awwobr
metricsValuesArrayMetric data points. Each element contains ts and the requested metric fields. Metric values are returned as numeric strings.See the example below

metricsValues Fields

ParameterTypeDescriptionExample
tsLongData point time as a Unix timestamp in milliseconds.1780044000000
readDelayStringRead delay. Returned only when requested."0.0"
readThroughputStringRead throughput. Returned only when requested."0.0"
readRpsStringRead RPS. Returned only when requested."0.0"
replicationDelayStringReplication delay. Returned only when requested."0.0"
writeThroughputStringWrite throughput. Returned only when requested."0.0"
writeRpsStringWrite RPS. Returned only when requested."0.0"
pendingRecordsStringPending 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
}
]
}
}

Result

A successful response returns the requested metric time series for the specified replication task and time range.

Metric Type Values

readDelay, readThroughput, readRps, replicationDelay, writeThroughput, writeRps, pendingRecords.