Queries the performance metric data of an ApsaraDB for MongoDB instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeDBInstancePerformance |
The operation that you want to perform. Set the value to DescribeDBInstancePerformance. |
RegionId | String | No | cn-hangzhou |
The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. |
DBInstanceId | String | Yes | dds-bp2635**** |
The ID of the instance. Note If you set this parameter to the ID of a sharded cluster instance, you must also specify
the NodeId parameter.
|
NodeId | String | No | d-bp2287**** |
The ID of the mongos or shard node in a sharded cluster instance. You can specify this parameter to view the performance data of a single node. Note This parameter is valid only when DBInstanceId is set to the ID of a sharded cluster instance.
|
Key | String | Yes | CpuUsage |
A performance metric. For more information about the valid values, see Performance metrics. Note If you specify multiple metrics, separate them with commas (,).
|
StartTime | String | Yes | 2022-06-13T10:58Z |
The beginning of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. |
EndTime | String | Yes | 2022-06-13T11:58Z |
The end of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. The end time must be later than the start time. |
RoleId | String | No | 6025**** |
The role ID of the node in a standalone or replica set instance. You can call the DescribeReplicaSetRole operation to query the role ID of the node. Note This parameter is valid only when you specify the DBInstanceId parameter to the ID of a standalone instance or a replica set instance.
|
ReplicaSetRole | String | No | Primary |
The role of the node in a standalone or replica set instance.
Note
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PerformanceKeys | Array of PerformanceKey |
Details about the performance metrics. |
|
PerformanceKey | |||
Key | String | CpuUsage |
The performance metric. |
Unit | String | % |
The unit of the performance metric. |
ValueFormat | String | cpu_usage |
The format of the performance metric value. If the performance metric contains multiple fields, the fields are separated with & symbols. For example, if you query disk usage, the returned ValueFormat value is in the ins_size&data_size&log_size format. |
PerformanceValues | Array of PerformanceValue |
Details about the performance metric values. |
|
PerformanceValue | |||
Value | String | 0.23 |
The value of the performance metric. |
Date | String | 2022-06-13T10:58:00Z |
The date and time when the metric value was generated. |
EndTime | String | 2022-06-13T11:58Z |
The end of the time range to query. The time is in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC. |
RequestId | String | 4A300BC7-6D8F-527F-A2DB-A7768D26E9AC |
The ID of the request. |
StartTime | String | 2022-06-13T10:58Z |
The beginning of the time range to query. The time is in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC. |
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/?Action=DescribeDBInstancePerformance
&DBInstanceId=dds-bp2635****
&Key=CpuUsage
&StartTime=2022-06-13T10:58Z
&EndTime=2022-06-13T11:58Z
&<Common request parameters>
Sample success responses
XML
format
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
format
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"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidStartTimeAndEndTime.Malformed | The end time must be greater than the start time | The error message returned because the end time must be later than the start time. |
For a list of error codes, visit the API Error Center.