You can call this operation to query the performance data of a node in an Apsara PolarDB cluster.

The performance data is collected every five seconds:

  • When the query time range is less than or equal to 1 hour, the data is displayed at intervals of 5 seconds.
  • When the query time range is less than or equal to 1 day, the data is displayed at intervals of 1 minute.
  • When the query time range is less than or equal to 7 days, the data is displayed at intervals of 10 minutes.
  • When the query time range is less than or equal to 30 days, the data is displayed at intervals of 1 hour.
  • When the query time range is greater than 30 days, the data is displayed at intervals of 1 day.

The performance data is collected every 60 seconds:

  • When the query time range is less than or equal to 1 day, the data is displayed at intervals of 1 minute.
  • When the query time range is less than or equal to 7 days, the data is displayed at intervals of 10 minutes.
  • When the query time range is less than or equal to 30 days, the data is displayed at intervals of 1 hour.
  • When the query time range is greater than 30 days, the data is displayed at intervals of 1 day.
Note The performance data is collected every 60 seconds by default. You can call the ModifyDBClusterMonitor operation to set the monitoring frequency to every 5 seconds.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
Action String No DescribeDBNodePerformance

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

DBNodeId String Yes pi-xxxxxxxxxxxxxxx

The ID of the cluster node.

EndTime String Yes 2012-06-08T15:00Z

The end of the time range where the data is queried. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

Key String Yes PolarDBDiskUsage

The performance indicators that you want to query. Separate multiple indicators with commas (,). For more information, see Performance parameters.

StartTime String Yes 2012-06-08T01:00Z

The beginning of the time range where the data is queried. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC.

DBClusterId String No pc-xxxxxxxxxxxxx

The ID of the Apsara PolarDB cluster that you want to manage.

Note Required

Response parameters

Parameter Type Example Description
DBNodeId String pi-xxxxxxxxxxxxxxx

The ID of the cluster node.

DBType String MySQL

The engine of the database.

DBVersion String 5.6

The version of the database engine.

EndTime String 2012-06-08T15:00Z

The end of the time range. The time is in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

PerformanceKeys Array

The list of cluster performance data.

PerformanceItem
Measurement String PolarDBDiskUsage

The performance indicator.

MetricName String mean_data_size

The name of the indicator.

Points Array

The array of performance indicators.

PerformanceItemValue
Timestamp Long 1571193960000

The timestamp of the monitoring indicator. Unit: milliseconds.

Value String 14.25

The value of the indicator.

RequestId String A0ADCEAF-3277-48DE-B66D-4B67B120916C

The ID of the request.

StartTime String 2012-06-08T01:00Z

The beginning of the time range. The time is in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC.

Example

Sample requests

http(s)://[Endpoint]/? Action=DescribeDBNodePerformance
&DBNodeId=pi-xxxxxxxxxxxxxxx
&EndTime=2012-06-08T15:00Z
&Key=PolarDBDiskUsage
&StartTime=2012-06-08T01:00Z
&<Common request parameters>

Sample success responses

XML format

<code>200</code>
<data>
    <PerformanceKeys>
        <PerformanceItem>
            <Measurement>PolarDBDiskUsage</Measurement>
            <MetricName>mean_data_size</MetricName>
            <Points>
                <PerformanceItemValue>
                    <Timestamp>1571193960000</Timestamp>
                    <Value>14.25</Value>
                </PerformanceItemValue>
            </Points>
        </PerformanceItem>
    </PerformanceKeys>
    <DBVersion>5.6</DBVersion>
    <RequestId>A0ADCEAF-3277-48DE-B66D-4B67B120916C</RequestId>
    <EndTime>2012-06-08T15:00Z</EndTime>
    <StartTime>2012-06-08T01:00Z</StartTime>
    <DBNodeId>pi-xxxxxxxxxxxxxxxx</DBNodeId>
    <DBType>MySQL</DBType>
</data>
<requestId>A0ADCEAF-3277-48DE-B66D-4B67B120916C</requestId>
<successResponse>true</successResponse>

JSON format

{
    "code":"200",
    "data":{
        "PerformanceKeys":{
            "PerformanceItem":[
                {
                    "Measurement":"PolarDBDiskUsage",
                    "MetricName":"mean_data_size",
                    "Points": {
                        "PerformanceItemValue": [
                            {
                                "Timestamp": 1571193960000,
                                "Value": "14.25"
                            }
                        ]
                    }
                }
            ]
        },
        "DBVersion":"5.6",
        "RequestId":"A0ADCEAF-3277-48DE-B66D-4B67B120916C",
        "EndTime":"2012-06-08T15:00Z",
        "StartTime":"2012-06-08T01:00Z",
        "DBNodeId":"pi-xxxxxxxxxxxxxxxx",
        "DBType":"MySQL"
    },
    "requestId":"A0ADCEAF-3277-48DE-B66D-4B67B120916C",
    "successResponse":true
}

Error codes

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