All Products
Search
Document Center

Elastic Container Instance:DescribeContainerGroupMetric

Last Updated:Nov 14, 2024

Queries the monitoring data of an elastic container instance.

Operation description

  • A maximum of 50 monitoring data entries can be returned. If the number of monitoring data entries exceeds this limit, an error message is returned.
  • You can query real-time monitoring data (data generated within the last 5 minutes) and historical data (data generated more than 5 minutes ago). If the time range to query starts or ends later than the current time, historical monitoring data generated more than 5 minutes ago is returned.
  • The elastic container instance whose monitoring data you want to query must be created after April 3, 2019, 15:00 UTC+8.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
eci:DescribeContainerGroupMetricget
*containergroup
acs:eci:{#regionId}:{#accountId}:containergroup/{#containergroupId}
  • eci:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instance.

cn-hangzhou
ContainerGroupIdstringYes

The instance ID.

eci-bp17da5olmkuagfr****
StartTimestringNo

The beginning of the time range to query. The beginning of the time range must be a time point in the last 30 days. The default value is 5 minutes before the value of EndTime.

Specify the time in RFC 3339 format. For example, to query the data starting from March 12, 2019, 09:00 UTC+8, you can set the parameter to 2019-03-12T09:00:00.000+08:00 or 2019-03-12T01:00:00.000Z.

2019-03-12T01:00:00.000Z
EndTimestringNo

The end of the time range to query. The default value is the current time.

Specify the time in RFC 3339 format.

2019-09-12T01:05:00.000Z
PeriodstringNo

The data aggregation period. Unit: seconds. Valid values: 15, 30, 60, and 600. Default value: 60.

Note If the StartTime and EndTime parameters are not specified, the system returns the monitoring data generated in the last 5 minutes with a data aggregation period of 15s. The Period parameter is ignored.
15

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC
ContainerGroupIdstring

The instance ID.

eci-bp1dqpye03ke5s6p****
Recordsarray<object>

The monitoring data of the elastic container instance.

Recordobject
Networkobject

The monitoring data of the network.

Interfacesarray<object>

The monitoring data of network interface controllers (NICs).

Interfaceobject
RxErrorslong

The number of received packet errors on the NIC.

0
TxDropslong

The number of transmitted packets dropped on the NIC.

0
TxByteslong

The number of bytes transmitted by the NIC.

1381805699
RxPacketslong

The number of packets received by the NIC.

4800583
TxPacketslong

The number of packets transmitted by the NIC.

5158427
Namestring

The name of the NIC.

eth0
TxErrorslong

The number of transmitted packet errors on the NIC.

0
RxByteslong

The number of bytes received by the NIC.

505001954
RxDropslong

The number of received packets dropped on the NIC.

0
CPUobject

The monitoring data of vCPUs.

UsageNanoCoreslong

The vCPU usage in the sampling window. Unit for the sampling window: nanoseconds.

0
Limitlong

The upper limit of vCPU usage. The calculation formula for this parameter: The number of vCPUs × 1000.

2000
UsageCoreNanoSecondslong

The cumulative usage of vCPUs.

70769883
Loadlong

The average load in the last 10 seconds.

0
Diskarray<object>

The monitoring data of disks.

DiskStatsobject
WriteByteslong

The amount of data that was written to the disk. Unit: bytes.

1375109120
WriteIOlong

This parameter is unavailable for public use.

123
Devicestring

The name of the disk.

/dev/vda
ReadIOlong

This parameter is unavailable for public use.

123
ReadByteslong

The amount of data that was read from the disk. Unit: bytes.

210714112
Timestampstring

The time when the monitoring data entry was collected. The time follows the RFC 3339 format.

2021-08-25T16:22:00.000+08:00
Memoryobject

The monitoring data of the memory.

Rsslong

The size of the resident memory set, which indicates the size of the physical memory that is actually used. Unit: bytes.

9289728
UsageByteslong

The size of the used memory. Unit: bytes.

9289728
WorkingSetlong

The usage of the working set. Unit: bytes.

9289728
AvailableByteslong

The size of the available memory. Unit: bytes.

4285091840
Cachelong

The size of the cache. Unit: bytes.

9289728
Filesystemarray<object>

The monitoring data of file system partitions.

FsStatsobject
Capacitylong

The total file system space.

41610981376
Availablelong

The size of the available space.

35319836672
FsNamestring

The name of the partition.

/dev/root
Usagelong

The size of used space.

4368744448
Categorystring

The type of the partition. Valid values:

  • System
  • Volume
  • Other
System
Containersarray<object>

The monitoring data of containers.

Containerobject
CPUobject

The vCPU monitoring data of the container.

UsageNanoCoreslong

The vCPU usage in the sampling window. Unit for the sampling window: nanoseconds.

0
Limitlong

The upper limit of vCPU usage. The calculation formula for this parameter: The number of vCPUs × 1000.

1024
UsageCoreNanoSecondslong

The cumulative usage of vCPUs.

40876694
Loadlong

The average load in the last 10 seconds.

0
Memoryobject

The memory monitoring data of the container.

Rsslong

The size of the resident memory set, which indicates the size of the physical memory that is actually used. Unit: bytes.

9289728
UsageByteslong

The size of the used memory. Unit: bytes.

9289728
WorkingSetlong

The usage of the working set. Unit: bytes.

9289728
AvailableByteslong

The size of the available memory. Unit: bytes.

4285091840
Cachelong

The size of the cache. Unit: bytes.

9289728
Namestring

The name of the container.

u1

Examples

Sample success responses

JSONformat

{
  "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

For a list of error codes, visit the Service error codes.