View instance performance data

Last Updated: Dec 06, 2017

Description

View the performance metric data for a user instance in a certain time period based on performance parameters. There are three output formats based on different query time ranges:

  • When the query time range is less than or equal to 1 day, performance values are shown by minute.

    Note: When the instance’s space usage key is MySQL_SpaceUsage or SQLServer_SpaceUsage, performance metric data can be queried only if the time range is up to 1 day.

  • Queries with time ranges from 1 to 7 days are not supported at the moment.

  • When the query time range is greater than 7 days and less than or equal to 15 days, performance values are shown by hour.

  • Queries with time ranges greater than 15 days and less than 30 days are not supported at the moment.

  • When the query time range is greater than or equal to 30 days and less than or equal to 1 year, performance values are shown by day.

Request parameters

Name Type Required? Description
Action String Yes Required parameter. Value: DescribeDBInstancePerformance.
DBInstanceId String Yes Instance ID.
Key Integer Yes Performance indicator. Multiple indicators are separated with the English “,”. See the performance parameters table.
StartTime String Yes Query start time, for example, 2012-06-11T15:00Z.
EndTime String Yes Query end time, for example, 2012-06-11T15:00Z.

Return parameters

Name Type Description
<Public Return Parameters> None For more information, see Public parameters.
DBInstanceId String Instance ID.
Engine String Database type.
StartTime String Query start time. Format: YYYY-MM-DD’T’HH:mmZ, for example, 2011-05-30T03:29Z.
EndTime String Query end time, which must be later than the query start time. Format: YYYY-MM-DD’T’HH:mmZ, for example, 2011-05-30T03:29Z.
PerformanceKeys List<PerformanceKey> Format of the array: {perf1, perf2, perf3, …}.

PerformanceKey parameters

Name Type Description
Key String Performance parameter.
Unit String Display unit.
ValueFormat String Value format. 1. If it is null, VALUE is a final value. 2. If it is not null, VALUE needs to be resolved and separated with “&”, for example, com_delete&com_insert&com_insert_select&com_replace
Values List<PerformanceValue> Format of the array: {value1, value2, …}

PerformanceValue parameters

Name Type Description
Value String Performance value
Date String Calculation date. Format: “yyyy-MM-dd’T’HH:mm:ssZ”, for example, 2011-05-30T03:29:00Z

Example

  • Request example
  1. https://rds.aliyuncs.com/?Action=DescribeDBInstancePerformance
  2. &DBInstanceId=riauvjz6zajfiq6ba1370329449201
  3. &key= MySQL_NetworkTraffic
  4. &StartTime=2013-01-11T15:00:00Z
  5. &EndTime=2013-06-05T15:00:00Z
  6. &<Public Request Parameters>
  • Return example

XML format:

  1. <DescribeDBInstancePerformanceResponse>
  2. <RequestId>A5409D02-D661-4BF3-8F3D-0A814D0574E7</RequestId>
  3. <DBInstanceID>riauvjz6zajfiq6ba1370329449201</DBInstanceID>
  4. <StartTime>2013-01-11T15:00:00Z</StartTime>
  5. <EndTime>2013-10-17T15:00Z</EndTime>
  6. <Engine>MySQL</Engine>
  7. <PerformanceKeys>
  8. <PerformanceKey>
  9. <Key>MySQL_NetworkTraffic</Key>
  10. <Unit>KB</Unit>
  11. <ValueFormat>recv_k&amp;sent_k</ValueFormat>
  12. <Values><Values/>
  13. </PerformanceKey>
  14. </PerformanceKeys>
  15. </DescribeDBInstancePerformanceResponse>

JSON format:

  1. {
  2. RequestIdA5409D02-D661-4BF3-8F3D-0A814D0574E7,
  3. "DBInstanceID": riauvjz6zajfiq6ba1370329449201,
  4. "StartTime": "2012-06-11T15:00Z",
  5. "EndTime": "2013-10-17T15:00Z",
  6. "Engine": "MySQL",
  7. "PerformanceKeys": {
  8. PerformanceKey[
  9. {
  10. "Key": "MySQL_NetworkTraffic",
  11. "Unit": "KB",
  12. "ValueFormat": "recv_k&sent_k",
  13. "Values": {
  14. "PerformanceValue":[]
  15. }
  16. }
  17. ]
  18. }
  19. }
Thank you! We've received your feedback.