Queries the performance data of an AnalyticDB for MySQL cluster.

You can query the performance data of a cluster over a specific time range based on its performance metrics. The data is collected every 30 seconds. This operation allows you to query information of 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. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDBClusterPerformance

The operation that you want to perform. Set the value to DescribeDBClusterPerformance.

DBClusterId String Yes am-************

The ID of the cluster.

Note You can call the DescribeDBClusters operation to query details about all AnalyticDB for MySQL clusters in a specific region, including cluster IDs.
Key String No AnalyticDB_CPU

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
  • Write
    • AnalyticDB_TPS: the write transactions per second (TPS)
    • AnalyticDB_InsertRT: the write response time
    • AnalyticDB_InsertBytes: the write throughout
  • Update
    • AnalyticDB_UpdateRT: the update response time
  • Delete
    • AnalyticDB_DeleteRT: the delete response time
  • Query
    • AnalyticDB_QPS: the queries per second (QPS)
    • AnalyticDB_QueryRT: the query response time
    • AnalyticDB_QueryWaitTime: the query wait time
  • Disk
    • 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 usage
    • AnalyticDB_HotDataDiskUsage: the disk usage of hot data
    • AnalyticDB_ColdDataDiskUsage: the disk usage of cold data
Note If this parameter is empty, the values of all the preceding performance metrics are returned.
StartTime String Yes 2021-05-03T15:00Z

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

EndTime String Yes 2021-05-03T15:01Z

The end of the time range to 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. Their interval cannot be more than two days.

Response parameters

Parameter Type Example Description
EndTime String 2021-05-03T15:01:00Z

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

RequestId String 25B56BC7-4978-40B3-9E48-4B7067******

The ID of the request.

StartTime String 2021-05-03T15:00:00Z

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

DBClusterId String am-************

The ID of the cluster.

Performances Array of PerformanceItem

Details about the performance metrics.

Key String AnalyticDB_CPU

The name of the performance metric.

Unit String %

The unit of the performance metric data.

Series Array of SeriesItem

Details about the performance metric data.

Values Array of String [ "2021-05-03T15:00:12.72Z", "0.1250" ], [ "2021-05-03T15:00:42.739Z", "0.3125" ]

The values of the performance metric data at different points in time.

Name String worker_avg_cpu_used

The name of the performance metric data.

Examples

Sample requests

http(s)://adb.aliyuncs.com/?Action=DescribeDBClusterPerformance
&DBClusterId=am-************
&Key=AnalyticDB_CPU
&StartTime=2021-06-01T15:00Z
&EndTime=2012-06-18T15:00:00Z
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDBClusterPerformanceResponse>
    <RequestId>25B56BC7-4978-40B3-9E48-4B7067******</RequestId>
    <EndTime>2021-05-03T15:01:00Z</EndTime>
    <DBClusterId>am-bp**************</DBClusterId>
    <StartTime>2021-05-03T15:00:00Z</StartTime>
    <Performances>
        <Series>
            <Values>
                <0>2021-05-03T15:00:12.72Z</0>
                <1>0.1875</1>
            </Values>
            <Values>
                <0>2021-05-03T15:00:42.739Z</0>
                <1>0.1250</1>
            </Values>
            <Name>worker_avg_cpu_used</Name>
        </Series>
        <Series>
            <Values>
                <0>2021-05-03T15:00:12.72Z</0>
                <1>0.1250</1>
            </Values>
            <Values>
                <0>2021-05-03T15:00:42.739Z</0>
                <1>0.3125</1>
            </Values>
            <Name>executor_avg_cpu_used</Name>
        </Series>
        <Unit>%</Unit>
        <Key>AnalyticDB_CPU</Key>
    </Performances>
</DescribeDBClusterPerformanceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "25B56BC7-4978-40B3-9E48-4B7067******",
  "EndTime" : "2021-05-03T15:01:00Z",
  "DBClusterId" : "am-bp**************",
  "StartTime" : "2021-05-03T15:00:00Z",
  "Performances" : [ {
    "Series" : [ {
      "Values" : [ [ "2021-05-03T15:00:12.72Z", "0.1875" ], [ "2021-05-03T15:00:42.739Z", "0.1250" ] ],
      "Name" : "worker_avg_cpu_used"
    }, {
      "Values" : [ [ "2021-05-03T15:00:12.72Z", "0.1250" ], [ "2021-05-03T15:00:42.739Z", "0.3125" ] ],
      "Name" : "executor_avg_cpu_used"
    } ],
    "Unit" : "%",
    "Key" : "AnalyticDB_CPU"
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.