All Products
Search
Document Center

Elastic Container Instance:DescribeContainerGroupMetric

Last Updated:Oct 17, 2025

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

eci:DescribeContainerGroupMetric

get

*containergroup

acs:eci:{#regionId}:{#accountId}:containergroup/{#containergroupId}

  • eci:tag
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

  • Volume

  • Other

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.