Queries the performance data of a MongoDB instance.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
dds:DescribeDBInstancePerformance | get | *dbinstance
|
| None |
Request parameters
Parameter | Type | Required | Description | Example |
DBInstanceId | string | Yes | The instance ID. Note NodeId is required when specifying a sharded cluster instance ID | dds-bp2635**** |
NodeId | string | No | The ID of a mongos or shard node in the sharded cluster instance. This parameter lets you query the performance of a single node. Note Available only when DBInstanceId is set to the ID of a sharded cluster instance. | d-bp2287**** |
Key | string | Yes | The performance metrics. For more information, see Metrics. Note To specify multiple metrics, separate them with commas (,). | CpuUsage |
StartTime | string | Yes | The beginning of the time range to query. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. | 2022-06-13T10:58Z |
EndTime | string | Yes | The end of the time range to query. The end time must be later than the start time. Specify the time in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC. | 2022-06-13T11:58Z |
RoleId | string | No | The role ID of a node in a standalone or replica set instance. To query the role ID, call the DescribeReplicaSetRole operation. Note Available only when DBInstanceId is set to the ID of a standalone or replica set instance. | 6025**** |
Interval | string | No | The data granularity of the performance metrics in seconds. Valid values: 5, 30, 60, 600, 1800, 3600, and 86400. | 60 |
ReplicaSetRole | string | No | The role of a node in a standalone or replica set instance. Valid values:
Note
| Primary |
SearchId | string | No | The Search node ID. Note Available only after the Search feature is enabled for the instance. | dds-2zec12675c9e****-search |
Response elements
Element | Type | Description | Example |
object | |||
| PerformanceKeys | object | ||
| PerformanceKey | array<object> | The list of performance metrics. | |
array<object> | |||
Key | string | The performance metric. | CpuUsage |
Unit | string | The unit of the performance metric. | % |
ValueFormat | string | The format of the performance metric values. If a performance metric contains multiple fields, the fields are separated by ampersands (&). For example, if you query the disk space usage, the returned ValueFormat is ins_size&data_size&log_size. | cpu_usage |
| PerformanceValues | object | ||
| PerformanceValue | array<object> | The list of performance metric values. | |
object | |||
Value | string | The value of the performance metric. | 0.23 |
Date | string | The time when the performance metric value was generated. | 2022-06-13T10:58:00Z |
EndTime | string | The end of the time range to query. The time is in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC. | 2022-06-13T11:58Z |
RequestId | string | The request ID. | 4A300BC7-6D8F-527F-A2DB-A7768D26E9AC |
StartTime | string | The beginning of the time range to query. The time is in the yyyy-MM-ddTHH:mmZ format. The time is displayed in UTC. | 2022-06-13T10:58Z |
Examples
Success response
JSON format
{
"PerformanceKeys": {
"PerformanceKey": [
{
"Key": "CpuUsage",
"Unit": "%",
"ValueFormat": "cpu_usage",
"PerformanceValues": {
"PerformanceValue": [
{
"Value": "0.23",
"Date": "2022-06-13T10:58:00Z"
}
]
}
}
]
},
"EndTime": "2022-06-13T11:58Z",
"RequestId": "4A300BC7-6D8F-527F-A2DB-A7768D26E9AC",
"StartTime": "2022-06-13T10:58Z"
}Error codes
HTTP status code | Error code | Error message | Description |
400 | InvalidPerformanceKey.Malformed | The specified parameter Key is not valid. | |
400 | InvalidStartTime.Malformed | The specified parameter StartTime is not valid. | |
400 | InvalidEndTime.Malformed | The specified parameter EndTime is not valid. | |
400 | InvalidStartTimeAndEndTime.Malformed | The end time must be greater than the start time | The end time cannot be earlier than the start time. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.