Queries the monitoring data of an Elastic Container Instance (ECI).
Operation description
This operation can return a maximum of 50 monitoring data records. An error is returned if the number of records exceeds 50.
You can query real-time data from the last 5 minutes or historical data from more than 5 minutes ago. If the specified time range extends beyond the current time, the operation queries only historical data by default.
Monitoring data is available only for ECI instances created after 15:00 on April 3, 2019 (UTC+8).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eci:DescribeContainerGroupMetric |
get |
*containergroup
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID. |
cn-hangzhou |
| ContainerGroupId |
string |
Yes |
The ID of the ECI instance. This is the container group ID. |
eci-bp17da5olmkuagfr**** |
| StartTime |
string |
No |
The start of the time range to query. The value must be within the last 30 days. The default value is 5 minutes before the value of EndTime. The time is in the RFC3339 format. For example, 09:00:00 on March 12, 2019 (UTC+8) can be represented as 2019-03-12T09:00:00.000+08:00 or 2019-03-12T01:00:00.000Z. |
2019-03-12T01:00:00.000Z |
| EndTime |
string |
No |
The end of the time range to query. The default value is the current time. The time is in the RFC3339 format. |
2019-09-12T01:05:00.000Z |
| Period |
string |
No |
The aggregation period. Unit: seconds. Valid values: 15, 30, 60, and 600. Default value: 60. Note
If you do not set StartTime and EndTime, the monitoring data of the last 5 minutes is queried. The default aggregation period is 15s, and the Period parameter is ignored. |
15 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The unique ID of the request. |
D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC |
| ContainerGroupId |
string |
The ID of the ECI instance. This is the container group ID. |
eci-bp1dqpye03ke5s6p**** |
| Records |
array<object> |
The monitoring data of the ECI instance. |
|
|
array<object> |
|||
| Network |
object |
The network data. |
|
| Interfaces |
array<object> |
The data of the network interface card (NIC). |
|
|
object |
|||
| RxErrors |
integer |
The total number of received error packets. |
0 |
| TxDrops |
integer |
The total number of dropped packets that were sent. |
0 |
| TxBytes |
integer |
The total number of bytes sent. |
1381805699 |
| RxPackets |
integer |
The total number of received packets. |
4800583 |
| TxPackets |
integer |
The total number of sent packets. |
5158427 |
| Name |
string |
The name of the NIC. |
eth0 |
| TxErrors |
integer |
The total number of sent error packets. |
0 |
| RxBytes |
integer |
The total number of bytes received. |
505001954 |
| RxDrops |
integer |
The total number of dropped packets that were received. |
0 |
| CPU |
object |
The CPU data. |
|
| UsageNanoCores |
integer |
The CPU usage in the sampling window, in nanocores. |
0 |
| Limit |
integer |
The CPU limit. This is calculated as the number of vCPUs × 1,000. |
2000 |
| UsageCoreNanoSeconds |
integer |
The cumulative CPU usage, in core-nanoseconds. |
70769883 |
| Load |
integer |
The average load over the last 10 seconds. |
0 |
| Disk |
array<object> |
The disk data. |
|
|
object |
|||
| WriteBytes |
integer |
The amount of data written to the disk, in bytes. |
1375109120 |
| WriteIO |
integer |
This parameter is not available. |
123 |
| Device |
string |
The name of the disk. |
/dev/vda |
| ReadIO |
integer |
This parameter is not available. |
123 |
| ReadBytes |
integer |
The amount of data read from the disk, in bytes. |
210714112 |
| Timestamp |
string |
The time when the monitoring data was collected. The time is in the RFC3339 format. |
2021-08-25T16:22:00.000+08:00 |
| Memory |
object |
The memory data. |
|
| Rss |
integer |
The resident set size (RSS). This is the amount of physical memory in use. |
9289728 |
| UsageBytes |
integer |
The memory usage, in bytes. |
9289728 |
| WorkingSet |
integer |
The working set size, in bytes. |
9289728 |
| AvailableBytes |
integer |
The available memory, in bytes. |
4285091840 |
| Cache |
integer |
The cache usage, in bytes. |
9289728 |
| Filesystem |
array<object> |
The data of the file system partitions. |
|
|
object |
|||
| Capacity |
integer |
The total storage capacity. |
41610981376 |
| Available |
integer |
The available storage space. |
35319836672 |
| FsName |
string |
The name of the partition. |
/dev/root |
| Usage |
integer |
The used storage space. |
4368744448 |
| Category |
string |
The type of the partition. Valid values:
|
System |
| Containers |
array<object> |
The monitoring data of the container. |
|
|
array<object> |
|||
| CPU |
object |
The CPU data of the container. |
|
| UsageNanoCores |
integer |
The CPU usage in the sampling window, in nanocores. |
0 |
| Limit |
integer |
The CPU limit. This is calculated as the number of vCPUs × 1,000. |
1024 |
| UsageCoreNanoSeconds |
integer |
The cumulative CPU usage, in core-nanoseconds. |
40876694 |
| Load |
integer |
The average load over the last 10 seconds. |
0 |
| Memory |
object |
The memory data of the container. |
|
| Rss |
integer |
The resident set size (RSS). This is the amount of physical memory in use. |
9289728 |
| UsageBytes |
integer |
The memory usage, in bytes. |
9289728 |
| WorkingSet |
integer |
The working set size, in bytes. |
9289728 |
| AvailableBytes |
integer |
The available memory, in bytes. |
4285091840 |
| Cache |
integer |
The cache usage, in bytes. |
9289728 |
| Name |
string |
The name of the container. |
u1 |
Examples
Success response
JSON format
{
"RequestId": "D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC",
"ContainerGroupId": "eci-bp1dqpye03ke5s6p****",
"Records": [
{
"Network": {
"Interfaces": [
{
"RxErrors": 0,
"TxDrops": 0,
"TxBytes": 1381805699,
"RxPackets": 4800583,
"TxPackets": 5158427,
"Name": "eth0",
"TxErrors": 0,
"RxBytes": 505001954,
"RxDrops": 0
}
]
},
"CPU": {
"UsageNanoCores": 0,
"Limit": 2000,
"UsageCoreNanoSeconds": 70769883,
"Load": 0
},
"Disk": [
{
"WriteBytes": 1375109120,
"WriteIO": 123,
"Device": "/dev/vda",
"ReadIO": 123,
"ReadBytes": 210714112
}
],
"Timestamp": "2021-08-25T16:22:00.000+08:00",
"Memory": {
"Rss": 9289728,
"UsageBytes": 9289728,
"WorkingSet": 9289728,
"AvailableBytes": 4285091840,
"Cache": 9289728
},
"Filesystem": [
{
"Capacity": 41610981376,
"Available": 35319836672,
"FsName": "/dev/root",
"Usage": 4368744448,
"Category": "System"
}
],
"Containers": [
{
"CPU": {
"UsageNanoCores": 0,
"Limit": 1024,
"UsageCoreNanoSeconds": 40876694,
"Load": 0
},
"Memory": {
"Rss": 9289728,
"UsageBytes": 9289728,
"WorkingSet": 9289728,
"AvailableBytes": 4285091840,
"Cache": 9289728
},
"Name": "u1"
}
]
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.