You can call this operation to return metric data.
Debugging
Authorization information
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| InstanceId | string | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
| Metrics | string | Yes | The metrics. Separate multiple metrics with commas (,). Example: "sql_all_count,sql_all_rt...". | sql_all_rt |
| StartTime | string | Yes | The start time, in the format of YYYY-MM-DDThh:mm:ssZ. | 2023-04-12T04:38:38Z |
| EndTime | string | Yes | The end time, in the format of YYYY-MM-DDThh:mm:ssZ. | 2023-04-12T05:38:38Z |
| Labels | string | Yes | A string of key-value pairs separated with commas (,). Each key and its value are separated with a colon (:). Multiple values of a key are separated with semicolons (;). Example: "clusterId:ob*****,tenantId:t******;t*******,serverId:*****,zoneId:cn-hangzhou-j". The string can contain only the following fixed keys:
| clusterId:ob*** |
| GroupByLabels | string | Yes | The one or more keys used for grouping. Separate multiple keys with commas (,). Example: "clusterId,tenantId". | clusterId |
| SortMetricKey | string | No | The sort column. | tps |
| SortOrder | string | No | The sorting rule. Valid values:
| DESC |
| Limit | string | No | The length of the data array returned after sorting. | 20 |
| ReplicaType | string | No | The type of the replica. Node filtering conditions are configured based on the replica type when you query the monitoring data of the OceanBase cluster.
| FULL |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
"Data": [
{
"Labels": {
"key": "clusterId:ob********"
},
"Data": [
{
"MetricValue": {
"key": "'load1': 1.29"
},
"Timestamp": 1702434300
}
]
}
]
}Error codes
For a list of error codes, visit the Service error codes.
