Queries the performance data of a specified cluster by calling the DescribeDBClusterPerformance operation.
Operation description
Queries the performance monitoring data of a specified cluster within a specified time range based on performance parameters. The data collection granularity is 30 seconds. You can query slow SQL statements and view monitoring metrics such as SQL query duration, scanned rows, and scan volume.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
adb:DescribeDBClusterPerformance |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The ID of the AnalyticDB for MySQL cluster. Note
You can call the DescribeDBClusters operation to query the details of all AnalyticDB for MySQL clusters in a specified region, including cluster IDs. |
am-8vbf80pjcz***** |
| Key |
string |
No |
The name of the performance metric (monitoring key) to query. Separate multiple values with commas (,). For more information about the supported metrics, see Monitoring metrics overview. |
AnalyticDB_CPU |
| StartTime |
string |
No |
The beginning of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format (UTC). |
2021-05-03T15:00Z |
| EndTime |
string |
No |
The end of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format (UTC). Note
The end time must be later than the start time, and the interval between the start time and end time cannot exceed two days. |
2021-05-03T15:01Z |
| RegionId |
string |
Yes |
The region in which the cluster resides. |
cn-hangzhou |
| ResourcePools |
string |
No |
The name of the resource group. |
test |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response details. |
||
| EndTime |
string |
The end of the time range for the query. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC). |
2021-05-03T15:01:00Z |
| RequestId |
string |
The request ID. |
25B56BC7-4978-40B3-9E48-4B7067****** |
| StartTime |
string |
The beginning of the time range for the query. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC). |
2021-05-03T15:00:00Z |
| DBClusterId |
string |
The cluster ID. |
am-8vbf80pjcz***** |
| Performances |
array<object> |
The list of cluster performance metrics. |
|
|
array<object> |
The performance metric details. |
||
| Key |
string |
The name of the performance metric. |
AnalyticDB_CPU |
| Unit |
string |
The unit of the data. |
% |
| Series |
array<object> |
The list of performance data. |
|
|
object |
The performance metric details. |
||
| Values |
array |
The details of the performance metric values. |
|
|
string |
The performance value details at different points in time. |
[ "2021-05-03T15:00:12.72Z", "0.1250" ], [ "2021-05-03T15:00:42.739Z", "0.3125" ] |
|
| Name |
string |
The name of the performance metric (monitoring metric Value Name). For more information about the metrics, see Monitoring metrics overview. |
worker_avg_cpu_used |
| Tags |
string |
The tags. |
instance_name: "amv-8vbf80pjcz*****" |
| TranslateKey |
string |
The English name of the corresponding metric. |
elastic_executor_avg_cpu_use |
| AccessDeniedDetail |
string |
The details about the access denial. This field is returned only when the Resource Access Management (RAM) permission verification fails. |
{ "AuthAction": "xxx", "AuthPrincipalDisplayName": "sampleName", "AuthPrincipalOwnerId": "111111111111111111", "AuthPrincipalType": "SubUser", "AuthResource": "xxx", "NoPermissionType": "xxx", "PolicyType": "xxx" } |
Examples
Success response
JSON format
{
"EndTime": "2021-05-03T15:01:00Z",
"RequestId": "25B56BC7-4978-40B3-9E48-4B7067******",
"StartTime": "2021-05-03T15:00:00Z",
"DBClusterId": "am-************",
"Performances": [
{
"Key": "AnalyticDB_CPU",
"Unit": "%",
"Series": [
{
"Values": [
"[ \"2021-05-03T15:00:12.72Z\", \"0.1250\" ], [ \"2021-05-03T15:00:42.739Z\", \"0.3125\" ]"
],
"Name": "worker_avg_cpu_used",
"Tags": "instance_name: \"amv-8vbf80pjcz*****\"",
"TranslateKey": "elastic_executor_avg_cpu_use"
}
]
}
],
"AccessDeniedDetail": "{\n \"AuthAction\": \"xxx\",\n \"AuthPrincipalDisplayName\": \"sampleName\",\n \"AuthPrincipalOwnerId\": \"111111111111111111\",\n \"AuthPrincipalType\": \"SubUser\",\n \"AuthResource\": \"xxx\",\n \"NoPermissionType\": \"xxx\",\n \"PolicyType\": \"xxx\"\n}"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.