调用DescribeDBClusterPerformance接口查看AnalyticDB PostgreSQL版实例在指定时间段的性能监控。

使用说明

本接口用于查看AnalyticDB PostgreSQL版实例的连接数、内存使用率、CPU使用率、I/O吞吐量、读写IOPS吞吐量、磁盘空间使用等监控指标的使用情况。

仅支持查询30天内的监控信息。

QPS限制

本接口的单用户QPS限制默认为1000次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。

本文档中的QPS仅为默认参考值,准确信息请参见API速率配额列表

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeDBClusterPerformance

系统规定参数。取值:DescribeDBClusterPerformance

DBInstanceId String gp-bp12ga6v69h86****

实例ID。

说明 您可以调用DescribeDBInstances接口查看目标地域下所有的AnalyticDB PostgreSQL实例的详情,包括实例ID。
Key String adbpg_conn_count

性能参数名称,多个指标用英文半角(,)分隔,具体信息,请参见性能参数表

StartTime String 2021-11-03T15:00Z

查询开始时间,格式为YYYY-MM-DDTHH:mmZ

说明 仅支持查询30天内的监控信息。
EndTime String 2021-11-03T15:10Z

查询结束时间,格式为YYYY-MM-DDTHH:mmZ

说明 查询结束时间需晚于开始时间,且开始时间和结束时间的时间间隔不能超过7天。
Nodes String top10

用于查询一个或多个节点的监控指标,多个节点名称间使用英文逗号(,)分隔,例如master-10******1,master-10******2。您可以调用DescribeDBClusterNode接口获取节点名称。

您也可以根据监控指标的高低筛选节点,取值说明:

  • top10:监控指标最高的十个节点。
  • top20:监控指标最高的二十个节点。
  • bottom10:监控指标最低的十个节点。
  • bottom20:监控指标最低的二十个节点。
NodeType String master

节点类型。取值说明:

  • master:Master节点。
  • segment:Segment节点。
说明 如果不传入该参数,则返回所有节点的监控指标。

返回数据

名称 类型 示例值 描述
PerformanceKeys Array of PerformanceKey

实例性能参数值列表。

Unit String %

监控指标的单位。

Series Array of SeriesItem

性能参数集合。

Values Array of ValueItem

性能参数值,每个值对应一个采集时间点。

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

性能监控具体信息,由时间和性能参数值构成。

Role String standby

节点的角色,取值说明:

  • master:主节点。
  • standby:备节点。
  • segment:计算节点。
Name String standby-********-cpu

计算节点或计算组名称。

Name String adbpg_group_cpu_used_percent

性能参数名称,具体信息,请参见性能参数表

EndTime String 2021-11-03T15:10Z

查询结束时间(UTC时间),格式为YYYY-MM-DDTHH:mmZ

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

请求ID。

StartTime String 2021-11-03T15:00Z

查询开始时间(UTC时间),格式为YYYY-MM-DDTHH:mmZ

DBClusterId String gp-bp12ga6v69h86****

实例ID。

示例

请求示例

http(s)://gpdb.aliyuncs.com/?Action=DescribeDBClusterPerformance
&DBInstanceId=gp-bp12ga6v69h86****
&Key=adbpg_conn_count
&StartTime=2021-11-03T15:00Z
&EndTime=2021-11-03T15:10Z
&Nodes=top10
&NodeType=master
&公共请求参数

正常返回示例

XML格式

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-bp12ga6v69h86****</DBClusterId>
    <StartTime>2021-11-03T07:00Z</StartTime>
</DescribeDBClusterPerformanceResponse>

JSON格式

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-bp12ga6v69h86****",
  "StartTime" : "2021-11-03T07:00Z"
}

错误码

访问错误中心查看更多错误码。