This API retrieves single- or multi-dimensional monitoring metrics for an OceanBase cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
oceanbase:DescribeMetricsData |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the OceanBase cluster. |
ob317v4uif**** |
| StartTime |
string |
Yes |
The start time for the query. The time must be in UTC and use the YYYY-MM-DDThh:mm:ssZ format. |
2021-06-13T15:40:43Z |
| EndTime |
string |
Yes |
The end time for the query. The time must be in UTC and use the YYYY-MM-DDThh:mm:ssZ format. |
2021-06-13T15:40:43Z |
| Metrics |
string |
Yes |
The monitoring metrics to query. |
sql_all_count |
| Labels |
string |
Yes |
A string of key-value pairs. Use a colon (:) to separate keys from values, and a comma (,) to separate key-value pairs. For example: "app:OB,clusterId:ob*****,tenantId:t******,serverId:*****,zoneId:cn-hangzhou-j".
|
app:OB,clusterId:ob*** |
| GroupByLabels |
string |
Yes |
The fields by which to group the results. Separate multiple fields with a comma. For example: "app,clusterId,tenantId". |
app,clusterId |
| SortMetricKey |
string |
No |
The metric key by which to sort the results. |
tps |
| SortOrder |
string |
No |
The sort order.
|
DESC |
| Limit |
string |
No |
The maximum number of items to return. |
5 |
| ReplicaType |
string |
No |
The replica type.
|
FULL |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. |
EE205C00-30E4-****-****-87E3A8A2AA0C |
| Data |
array |
The returned data. |
[ { "sql_select_count":75.****15****1515, "timestamp":165079**** }, ...... ] |
|
string |
A JSON-formatted string that contains the data points. |
[{'clusterId': 'ob5b8*********', 'Data': [{'timestamp': 1702434300, 'sql_all_rt': 0.64}, {'timestamp': 1702434240, 'sql_all_rt': 0.0}], 'tenantId': 't5b8*********'}] |
Examples
Success response
JSON format
{
"RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
"Data": [
"[{'clusterId': 'ob5b8*********', 'Data': [{'timestamp': 1702434300, 'sql_all_rt': 0.64}, {'timestamp': 1702434240, 'sql_all_rt': 0.0}], 'tenantId': 't5b8*********'}]"
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.