Queries the details of performance metrics of an AnalyticDB for PostgreSQL instance within a specific time range.

Description

This operation is called to query the performance metrics of an AnalyticDB for PostgreSQL instance, such as the number of connections, memory usage, CPU utilization, I/O throughput, read IOPS, write IOPS, and disk space usage.

You can query monitoring information only within the last 30 days.

Limits

You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered and may affect your business. We recommend that you take note of the limit when you call this operation.

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.

DBInstanceId String Yes gp-bp***************

The ID of the instance.

Note You can call the DescribeDBInstances operation to query the details of all AnalyticDB for PostgreSQL instances in a specific region, including instance IDs.
Key String Yes adbpg_conn_count

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

StartTime String Yes 2021-11-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.

Note You can query monitoring information only within the last 30 days.
EndTime String Yes 2021-11-03T15:10Z

The end of the time range to query. Specify the time in the ISO 8601 standard in the YYYY-MM-DDTHH:mmZ format.

Note The end time must be later than the start time. The interval cannot be more than seven days.
Nodes String No top10

The nodes for which you want to query performance metrics. Separate multiple values with commas (,). Example: master-10******1,master-10******2. You can call the DescribeDBClusterNode operation to query the names of nodes.

The nodes can also be filtered based on their metric values. Valid values:

  • top10: the 10 nodes that have the highest metric values
  • top20: the 20 nodes that have the highest metric values
  • bottom10: the 10 nodes that have the lowest metric values
  • bottom20: the 20 nodes that have the lowest metric values
NodeType String No master

The node type. Valid values:

  • master: coordinator node
  • segment: compute node
Note If you do not specify this parameter, the performance metrics of all nodes are returned.

Response parameters

Parameter Type Example Description
PerformanceKeys Array of PerformanceKey

Details of the performance metrics of the instance.

Unit String %

The unit of the performance metric.

Series Array of SeriesItem

Details of the performance metric of a node.

Values Array of ValueItem

The value of the performance metric collected at a point in time.

Point Array of String ["2021-11-03T15:00:00+08:00","5.84"]

The value of the performance metric and the time when the metric value was collected.

Role String standby

The role of the node. Valid values:

  • master: primary coordinator node
  • standby: standby coordinator node
  • segment: compute node
Name String standby-********-cpu

The name of the compute node or compute group.

Name String adbpg_group_cpu_used_percent

The name of the performance metric. For more information, see Performance parameters.

EndTime String 2021-11-03T15:10Z

The end time of the query. The time follows the ISO 8601 standard in the YYYY-MM-DDTHH:mmZ format. The time is displayed in UTC.

RequestId String 8E8990F0-C81E-4C94-8F51-5F**********

The ID of the request.

StartTime String 2021-11-03T15:00Z

The start time of the query. The time follows the ISO 8601 standard in the YYYY-MM-DDTHH:mmZ format. The time is displayed in UTC.

DBClusterId String gp-bp***************

The ID of the instance.

Examples

Sample requests

http(s)://gpdb.aliyuncs.com/?Action=DescribeDBClusterPerformance
&DBInstanceId=gp-bp***************
&Key=adbpg_conn_count
&StartTime=2021-11-03T15:00Z
&EndTime=2021-11-03T15:10Z
&<Common request parameters>

Sample success responses

XML format

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

<DescribeDBClusterPerformanceResponse>
    <PerformanceKeys>
        <Series>
            <Role>master</Role>
            <Values>
                <Point>2021-11-03T15:00:00+08:00</Point>
                <Point>5.84</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:01:00+08:00</Point>
                <Point>5.31</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:02:00+08:00</Point>
                <Point>5.28</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:03:00+08:00</Point>
                <Point>5.27</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:04:00+08:00</Point>
                <Point>5.63</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:05:00+08:00</Point>
                <Point>5.44</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:06:00+08:00</Point>
                <Point>5.27</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:07:00+08:00</Point>
                <Point>5.27</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:08:00+08:00</Point>
                <Point>5.96</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:09:00+08:00</Point>
                <Point>6.51</Point>
            </Values>
            <Name>master-********-cpu</Name>
        </Series>
        <Series>
            <Role>standby</Role>
            <Values>
                <Point>2021-11-03T15:00:00+08:00</Point>
                <Point>0.01</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:01:00+08:00</Point>
                <Point>0</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:02:00+08:00</Point>
                <Point>0.01</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:03:00+08:00</Point>
                <Point>0</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:04:00+08:00</Point>
                <Point>0</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:05:00+08:00</Point>
                <Point>0.01</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:06:00+08:00</Point>
                <Point>0.01</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:07:00+08:00</Point>
                <Point>0.01</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:08:00+08:00</Point>
                <Point>0</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:09:00+08:00</Point>
                <Point>0.01</Point>
            </Values>
            <Name>standby-********-cpu</Name>
        </Series>
        <Series>
            <Role>segment</Role>
            <Values>
                <Point>2021-11-03T15:00:00+08:00</Point>
                <Point>0.13</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:01:00+08:00</Point>
                <Point>0.12</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:02:00+08:00</Point>
                <Point>0.14</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:03:00+08:00</Point>
                <Point>0.13</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:04:00+08:00</Point>
                <Point>0.12</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:05:00+08:00</Point>
                <Point>0.14</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:06:00+08:00</Point>
                <Point>0.16</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:07:00+08:00</Point>
                <Point>0.16</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:08:00+08:00</Point>
                <Point>0.16</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:09:00+08:00</Point>
                <Point>0.12</Point>
            </Values>
            <Name>compute-node-********-cpu</Name>
        </Series>
        <Series>
            <Role>segment</Role>
            <Values>
                <Point>2021-11-03T15:00:00+08:00</Point>
                <Point>0.15</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:01:00+08:00</Point>
                <Point>0.13</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:02:00+08:00</Point>
                <Point>0.12</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:03:00+08:00</Point>
                <Point>0.12</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:04:00+08:00</Point>
                <Point>0.12</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:05:00+08:00</Point>
                <Point>0.13</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:06:00+08:00</Point>
                <Point>0.15</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:07:00+08:00</Point>
                <Point>0.17</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:08:00+08:00</Point>
                <Point>0.15</Point>
            </Values>
            <Values>
                <Point>2021-11-03T15:09:00+08:00</Point>
                <Point>0.12</Point>
            </Values>
            <Name>compute-node-********-cpu</Name>
        </Series>
        <Unit>%</Unit>
        <Name>adbpg_group_cpu_used_percent</Name>
    </PerformanceKeys>
    <RequestId>8E8990F0-C81E-4C94-8F51-5F**********</RequestId>
    <EndTime>2021-11-03T07:10Z</EndTime>
    <DBClusterId>gp-bp***************</DBClusterId>
    <StartTime>2021-11-03T07:00Z</StartTime>
</DescribeDBClusterPerformanceResponse>

JSON format

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

{
  "PerformanceKeys" : [ {
    "Series" : [ {
      "Role" : "master",
      "Values" : [ {
        "Point" : [ "2021-11-03T15:00:00+08:00", "5.84" ]
      }, {
        "Point" : [ "2021-11-03T15:01:00+08:00", "5.31" ]
      }, {
        "Point" : [ "2021-11-03T15:02:00+08:00", "5.28" ]
      }, {
        "Point" : [ "2021-11-03T15:03:00+08:00", "5.27" ]
      }, {
        "Point" : [ "2021-11-03T15:04:00+08:00", "5.63" ]
      }, {
        "Point" : [ "2021-11-03T15:05:00+08:00", "5.44" ]
      }, {
        "Point" : [ "2021-11-03T15:06:00+08:00", "5.27" ]
      }, {
        "Point" : [ "2021-11-03T15:07:00+08:00", "5.27" ]
      }, {
        "Point" : [ "2021-11-03T15:08:00+08:00", "5.96" ]
      }, {
        "Point" : [ "2021-11-03T15:09:00+08:00", "6.51" ]
      } ],
      "Name" : "master-********-cpu"
    }, {
      "Role" : "standby",
      "Values" : [ {
        "Point" : [ "2021-11-03T15:00:00+08:00", "0.01" ]
      }, {
        "Point" : [ "2021-11-03T15:01:00+08:00", "0" ]
      }, {
        "Point" : [ "2021-11-03T15:02:00+08:00", "0.01" ]
      }, {
        "Point" : [ "2021-11-03T15:03:00+08:00", "0" ]
      }, {
        "Point" : [ "2021-11-03T15:04:00+08:00", "0" ]
      }, {
        "Point" : [ "2021-11-03T15:05:00+08:00", "0.01" ]
      }, {
        "Point" : [ "2021-11-03T15:06:00+08:00", "0.01" ]
      }, {
        "Point" : [ "2021-11-03T15:07:00+08:00", "0.01" ]
      }, {
        "Point" : [ "2021-11-03T15:08:00+08:00", "0" ]
      }, {
        "Point" : [ "2021-11-03T15:09:00+08:00", "0.01" ]
      } ],
      "Name" : "standby-********-cpu"
    }, {
      "Role" : "segment",
      "Values" : [ {
        "Point" : [ "2021-11-03T15:00:00+08:00", "0.13" ]
      }, {
        "Point" : [ "2021-11-03T15:01:00+08:00", "0.12" ]
      }, {
        "Point" : [ "2021-11-03T15:02:00+08:00", "0.14" ]
      }, {
        "Point" : [ "2021-11-03T15:03:00+08:00", "0.13" ]
      }, {
        "Point" : [ "2021-11-03T15:04:00+08:00", "0.12" ]
      }, {
        "Point" : [ "2021-11-03T15:05:00+08:00", "0.14" ]
      }, {
        "Point" : [ "2021-11-03T15:06:00+08:00", "0.16" ]
      }, {
        "Point" : [ "2021-11-03T15:07:00+08:00", "0.16" ]
      }, {
        "Point" : [ "2021-11-03T15:08:00+08:00", "0.16" ]
      }, {
        "Point" : [ "2021-11-03T15:09:00+08:00", "0.12" ]
      } ],
      "Name" : "compute-node-********-cpu"
    }, {
      "Role" : "segment",
      "Values" : [ {
        "Point" : [ "2021-11-03T15:00:00+08:00", "0.15" ]
      }, {
        "Point" : [ "2021-11-03T15:01:00+08:00", "0.13" ]
      }, {
        "Point" : [ "2021-11-03T15:02:00+08:00", "0.12" ]
      }, {
        "Point" : [ "2021-11-03T15:03:00+08:00", "0.12" ]
      }, {
        "Point" : [ "2021-11-03T15:04:00+08:00", "0.12" ]
      }, {
        "Point" : [ "2021-11-03T15:05:00+08:00", "0.13" ]
      }, {
        "Point" : [ "2021-11-03T15:06:00+08:00", "0.15" ]
      }, {
        "Point" : [ "2021-11-03T15:07:00+08:00", "0.17" ]
      }, {
        "Point" : [ "2021-11-03T15:08:00+08:00", "0.15" ]
      }, {
        "Point" : [ "2021-11-03T15:09:00+08:00", "0.12" ]
      } ],
      "Name" : "compute-node-********-cpu"
    } ],
    "Unit" : "%",
    "Name" : "adbpg_group_cpu_used_percent"
  } ],
  "RequestId" : "8E8990F0-C81E-4C94-8F51-5F**********",
  "EndTime" : "2021-11-03T07:10Z",
  "DBClusterId" : "gp-bp***************",
  "StartTime" : "2021-11-03T07:00Z"
}

Error codes

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