调用DescribeDBInstancePerformance接口查询云数据库MongoDB实例的性能指标数据。

调试

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

请求参数

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

系统规定参数。取值:DescribeDBInstancePerformance。

RegionId String cn-hangzhou

地域ID。您可以通过调用DescribeRegions接口查询。

DBInstanceId String dds-bp2635****

实例ID。

说明 当本参数传入的是分片集群实例ID时,还需要传入NodeId参数。
NodeId String d-bp2287****

分片集群实例中Mongos节点ID或Shard节点ID,可用于查询单个节点的性能情况。

说明DBInstanceId参数传入的是分片集群实例ID时,本参数才可用。
Key String CpuUsage

性能指标,取值详情请参见性能参数表

说明 如需传入多个指标请用英文逗号(,)分隔。
StartTime String 2022-06-13T10:58Z

查询开始时间,格式为yyyy-MM-ddTHH:mmZ(UTC时间)。

EndTime String 2022-06-13T11:58Z

查询结束时间,必须晚于查询开始时间,格式为yyyy-MM-ddTHH:mmZ(UTC时间)。

RoleId String 6025****

单节点实例或副本集实例的节点角色ID。您可以通过调用DescribeReplicaSetRole接口查询。

说明DBInstanceId参数传入的是单节点实例ID或副本集实例ID时,本参数才可用。
ReplicaSetRole String Primary

单节点实例或副本集实例的节点角色,取值说明:

  • Primary:主节点。
  • Secondary:从节点。
说明
  • DBInstanceId参数传入的是单节点实例ID或副本集实例ID时,本参数才可用。
  • DBInstanceId参数传入的是单节点实例时,本参数的取值仅支持Primary

返回数据

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

性能指标信息列表。

PerformanceKey
Key String CpuUsage

性能指标。

Unit String %

性能指标的单位。

ValueFormat String cpu_usage

性能指标值的格式。如果该性能指标包含多个字段,通常以&分隔。

例如查询磁盘空间使用量,返回的ValueFormat即为ins_size&data_size&log_size

PerformanceValues Array of PerformanceValue

性能指标值列表。

PerformanceValue
Value String 0.23

性能指标值。

Date String 2022-06-13T10:58:00Z

性能指标值产生的日期。

EndTime String 2022-06-13T11:58Z

查询结束时间,格式为yyyy-MM-ddTHH:mmZ(UTC时间)。

RequestId String 4A300BC7-6D8F-527F-A2DB-A7768D26E9AC

请求ID。

StartTime String 2022-06-13T10:58Z

查询开始时间,格式为yyyy-MM-ddTHH:mmZ(UTC时间)。

示例

请求示例

http(s)://mongodb.aliyuncs.com/?Action=DescribeDBInstancePerformance
&DBInstanceId=dds-bp2635****
&Key=CpuUsage
&StartTime=2022-06-13T10:58Z
&EndTime=2022-06-13T11:58Z
&公共请求参数

正常返回示例

XML格式

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

<DescribeDBInstancePerformanceResponse>
    <PerformanceKeys>
        <PerformanceKey>
            <ValueFormat>cpu_usage</ValueFormat>
            <PerformanceValues>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T10:58:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T10:59:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.22</Value>
                    <Date>2022-06-13T11:00:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:01:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:02:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:03:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:04:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:05:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:06:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:07:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:08:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:09:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:10:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:11:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:12:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:13:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:14:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:15:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:16:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:17:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:18:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.22</Value>
                    <Date>2022-06-13T11:19:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.22</Value>
                    <Date>2022-06-13T11:20:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:21:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:22:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:23:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:24:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:25:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:26:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:27:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:28:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:29:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:30:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:31:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:32:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:33:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:34:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:35:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:36:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:37:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:38:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:39:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:40:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:41:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:42:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:43:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:44:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:45:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:46:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:47:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:48:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:49:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:50:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.24</Value>
                    <Date>2022-06-13T11:51:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:52:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:53:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:54:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:55:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:56:00Z</Date>
                </PerformanceValue>
                <PerformanceValue>
                    <Value>0.23</Value>
                    <Date>2022-06-13T11:57:00Z</Date>
                </PerformanceValue>
            </PerformanceValues>
            <Unit>%</Unit>
            <Key>CpuUsage</Key>
        </PerformanceKey>
    </PerformanceKeys>
    <RequestId>4A300BC7-6D8F-527F-A2DB-A7768D26E9AC</RequestId>
    <EndTime>2022-06-13T11:58Z</EndTime>
    <StartTime>2022-06-13T10:58Z</StartTime>
</DescribeDBInstancePerformanceResponse>

JSON格式

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

{
  "PerformanceKeys" : {
    "PerformanceKey" : {
      "ValueFormat" : "cpu_usage",
      "PerformanceValues" : {
        "PerformanceValue" : [ {
          "Value" : 0.23,
          "Date" : "2022-06-13T10:58:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T10:59:00Z"
        }, {
          "Value" : 0.22,
          "Date" : "2022-06-13T11:00:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:01:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:02:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:03:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:04:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:05:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:06:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:07:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:08:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:09:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:10:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:11:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:12:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:13:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:14:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:15:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:16:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:17:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:18:00Z"
        }, {
          "Value" : 0.22,
          "Date" : "2022-06-13T11:19:00Z"
        }, {
          "Value" : 0.22,
          "Date" : "2022-06-13T11:20:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:21:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:22:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:23:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:24:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:25:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:26:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:27:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:28:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:29:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:30:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:31:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:32:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:33:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:34:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:35:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:36:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:37:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:38:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:39:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:40:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:41:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:42:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:43:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:44:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:45:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:46:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:47:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:48:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:49:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:50:00Z"
        }, {
          "Value" : 0.24,
          "Date" : "2022-06-13T11:51:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:52:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:53:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:54:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:55:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:56:00Z"
        }, {
          "Value" : 0.23,
          "Date" : "2022-06-13T11:57:00Z"
        } ]
      },
      "Unit" : "%",
      "Key" : "CpuUsage"
    }
  },
  "RequestId" : "4A300BC7-6D8F-527F-A2DB-A7768D26E9AC",
  "EndTime" : "2022-06-13T11:58Z",
  "StartTime" : "2022-06-13T10:58Z"
}

错误码

HttpCode 错误码 错误信息 描述
400 InvalidStartTimeAndEndTime.Malformed The end time must be greater than the start time 结束时间不能小于开始时间

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