Queries the metrics of model operators.
Operation description
For more information about kernel versions for PolarDB for MySQL clusters, see Kernel versions and Kernel release notes.
Try it now
Test
RAM authorization
Request syntax
GET HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The cluster ID. |
pm-2zejpr*** |
| RelativeDBClusterId |
string |
No |
The ID of the associated PolarDB instance. |
pc-2zejpr*** |
| PageSize |
integer |
No |
The number of records to return on each page. Valid values:
The default value is 100. |
100 |
| PageNumber |
integer |
No |
The page number of the query result. |
1 |
| StartTime |
string |
Yes |
The start time of the query. The time is in the |
2026-01-15T14:00:00Z |
| EndTime |
string |
Yes |
The end time of the query. The time is in the |
2026-01-15T15:00:00Z |
| Reverse |
boolean |
No |
Specifies whether to sort the results in reverse order. The default value is false. |
false |
| MetricType |
string |
No |
The metric type. Valid values:
Note
The default value is all. |
all |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| PageRecordCount |
integer |
The total number of entries that match the query conditions. This parameter is optional and is not returned by default. |
5 |
| RequestId |
string |
Id of the request |
5E71541A-6007-4DCC-A38A-F872C31FEB45 |
| PageSize |
integer |
The maximum number of entries returned for the current request. |
10 |
| PageNumber |
integer |
The page number of the returned page. The default value is 1. |
1 |
| StartTime |
string |
The start time of the query. The time is in the |
2026-01-15T14:00:00Z |
| EndTime |
string |
The end time of the query. The time is in the |
2026-01-15T15:00:00Z |
| Items |
object |
The list. |
|
| SlsMetricsItems |
array<object> |
The list of metrics. |
|
|
array<object> |
|||
| Timestamp |
string |
The specific point in time when the monitoring metric was collected. The value is a UNIX timestamp. Unit: seconds. |
1742090703 |
| LogTime |
string |
The log time. |
2026-01-15T14:16:49.52140317Z |
| CurrentStep |
integer |
The current step. |
21 |
| GlobalStep |
integer |
The total number of steps. |
90 |
| Epoch |
number |
The epoch. |
0.23 |
| MetricType |
string |
The metric type. |
train |
| Metric |
object |
The metric details. |
{"memory(GiB)":"xxx"} |
| MetricType |
string |
The metric type. |
all |
| DBClusterId |
string |
The cluster ID. |
pm-2zejpr*** |
| RelativeDbClusterId |
string |
The ID of the associated PolarDB cluster. |
pc-2zejpr*** |
Examples
Success response
JSON format
{
"PageRecordCount": 5,
"RequestId": "5E71541A-6007-4DCC-A38A-F872C31FEB45",
"PageSize": 10,
"PageNumber": 1,
"StartTime": "2026-01-15T14:00:00Z",
"EndTime": "2026-01-15T15:00:00Z",
"Items": {
"SlsMetricsItems": [
{
"Timestamp": "1742090703",
"LogTime": "2026-01-15T14:16:49.52140317Z",
"CurrentStep": 21,
"GlobalStep": 90,
"Epoch": 0.23,
"MetricType": "train",
"Metric": {
"memory(GiB)": "xxx"
}
}
]
},
"MetricType": "all",
"DBClusterId": "pm-2zejpr***",
"RelativeDbClusterId": "pc-2zejpr***"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.