All Products
Search
Document Center

AnalyticDB for MySQL:DescribeDBClusterPerformance

Last Updated:Mar 15, 2024

Queries the performance data of an AnalyticDB for MySQL cluster.

Operation description

You can call this operation to query the performance data of a cluster over a time range based on its performance metrics. The data is collected every 30 seconds. This operation allows you to query information about slow queries, such as the SQL query duration, number of scanned rows, and amount of scanned data.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
adb:DescribeDBClusterPerformanceRead
  • DBCluster
    acs:adb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the AnalyticDB for MySQL cluster.

Note You can call the DescribeDBClusters operation to query the IDs of all AnalyticDB for MySQL clusters within a region.
am-************
KeystringYes

The performance metrics to be queried. Separate multiple values with commas (,). Valid values:

  • CPU

    • AnalyticDB_CPU: the average CPU utilization.
  • Connections

    • AnalyticDB_Connections: the number of database connections.
  • Writes

    • AnalyticDB_TPS: the write transactions per second (TPS).
    • AnalyticDB_InsertRT: the write response time.
    • AnalyticDB_InsertBytes: the write throughput.
  • Updates

    • AnalyticDB_UpdateRT: the update response time.
  • Deletion

    • AnalyticDB_DeleteRT: the delete response time.
  • Queries

    • AnalyticDB_QPS: the queries per second (QPS).
    • AnalyticDB_QueryRT: the query response time.
    • AnalyticDB_QueryWaitTime: the query wait time.
  • Disks

    • AnalyticDB_IO: the disk I/O throughput.
    • AnalyticDB_IO_UTIL: the I/O utilization.
    • AnalyticDB_IO_WAIT: the I/O wait time.
    • AnalyticDB_IOPS: the disk input/output operations per second (IOPS).
    • AnalyticDB_DiskUsage: the disk space that is used.
    • AnalyticDB_HotDataDiskUsage: the disk space that is used by hot data.
    • AnalyticDB_ColdDataDiskUsage: the disk space that is used by cold data.
Note If you leave this parameter empty, the values of all the preceding performance metrics are returned.
AnalyticDB_CPU
StartTimestringYes

The start time of the query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

2021-05-03T15:00Z
EndTimestringYes

The end time of the query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

Note The end time must be later than the start time. The maximum time range that can be specified is two days.
2021-05-03T15:01Z
RegionIdstringYes

The region ID of the cluster.

cn-hangzhou
ResourcePoolsstringNo

The name of the resource group.

test

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

EndTimestring

The end time of the query. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-05-03T15:01:00Z
RequestIdstring

The request ID.

25B56BC7-4978-40B3-9E48-4B7067******
StartTimestring

The start time of the query. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2021-05-03T15:00:00Z
DBClusterIdstring

The cluster ID.

am-************
Performancesobject []

The queried performance metrics.

Keystring

The name of the performance metric.

AnalyticDB_CPU
Unitstring

The unit of the performance metrics.

%
Seriesobject []

The queried performance metric data.

Valuesarray

The values of the queried performance metrics.

string

The values of the performance metrics at different points in time.

[ "2021-05-03T15:00:12.72Z", "0.1250" ], [ "2021-05-03T15:00:42.739Z", "0.3125" ]
Namestring

The name of the performance metric value.

worker_avg_cpu_used
Tagsstring

The tags that are added to the cluster.

instance_name: "amv-8vbf80pjcz*****"

Examples

Sample success responses

JSONformat

{
  "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*****\""
        }
      ]
    }
  ]
}

Error codes

HTTP status codeError codeError message
400IdempotentParameterMismatchThe 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.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-10-10API Description Update. The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: RegionId
    Added Input Parameters: ResourcePools
Output ParametersThe response structure of the API has changed.
2023-04-06The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Added Error Codes: 400
    Added Error Codes: 403