Queries the monitoring data of a container group.

Description

  • Currently, a maximum of 50 monitoring data entries can be returned. If the number of monitoring data entries exceeds the upper limit, an error message is returned.
  • Currently, you can only query the monitoring data generated in the last 5 minutes or 5 minutes ago. If the time range to query starts from 5 minutes ago and ends in the past 5 minutes, only the monitoring data generated 5 minutes ago is returned.
  • Currently, you can only query the monitoring data of a container group that was created after 15:00 on April 3, 2019.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No DescribeContainerGroupMetric

The operation that you want to perform. Set the value to DescribeContainerGroupMetric.

ContainerGroupId String Yes eci-bp17da5olmkuagfrzurh

The ID of the container group.

RegionId String Yes cn-hangzhou

The region ID of the container group.

StartTime String No 2019-03-12T01:00:00.000Z

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

  • The beginning of the time range must be a time point in the past 30 days. To query the data from 09:00 on March 12, 2019 in UTC+8, you can set the parameter to the following value:

    2019-03-12T09:00:00.000+08:00 or 2019-03-12T01:00:00.000Z

The time must be a string. Specify the time in the RFC 3339 standard.

EndTime String No 2019-09-12T01:00:00.000Z

The end of the time range to query. The default value is the current time. The time must be a string. Specify the time in the RFC 3339 standard.

Period String No 15

The aggregation period. Valid values: 15, 30, 60, and 600. Default value: 60. Unit: seconds. Assume that both StartTime and EndTime are not specified. The system returns the data generated in the last 5 minutes and the default aggregation period is 15s. In this case, the aggregation period specified by you does not take effect.

Response parameters

Parameter Type Example Description
RequestId String D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC

The unique ID of the request.

ContainerGroupId String eci-bp1dqpye03ke5s6p2ijc

The ID of the container group.

Records Array N/A

The detailed monitoring data.

Timestamp String 2019-03-29T10:38:50.734+08:00

The time when the monitoring data entry was collected.

Containers Array N/A

The information about the containers.

Name String u1

The name of the container.

CPU Struct N/A

The information about the CPU resources.

UsageNanoCores Long 0

The number of used vCPUs on the node during the aggregation period.

UsageCoreNanoSeconds Long 40876694

The usage duration of vCPUs on the node. Unit: seconds.

Load Long 0

The load on the vCPUs.

Limit Long 1024

The maximum number of allocated vCPUs.

Memory Struct N/A

The information about the memory resources.

AvailableBytes Long 4285091840

The size of available memory. Unit: bytes.

UsageBytes Long 9289728

The size of used memory. Unit: bytes.

Cache Long 9289728

The size of the cache.

WorkingSet Long 9289728

The virtual set size (VSS) of the consumed physical memory.

Rss Long 9289728

The resident set size (RSS) of the used physical memory.

CPU Struct N/A

The information about the CPU resources.

UsageNanoCores Long 0

The number of used vCPUs on the node during the aggregation period.

UsageCoreNanoSeconds Long 40876694

The usage duration of vCPUs on the node. Unit: seconds.

Load Long 0

The load on the vCPUs.

Limit Long 1024

The maximum number of allocated vCPUs.

Memory Struct N/A

The information about the memory resources.

AvailableBytes Long 4285091840

The size of available memory. Unit: bytes.

UsageBytes Long 9289728

The size of used memory. Unit: bytes.

Cache Long 9289728

The size of the cache.

WorkingSet Long 9289728

The VSS of the consumed physical memory.

Rss Long 9289728

The RSS of the used physical memory.

Network Struct N/A

The information about the network.

Interfaces Array N/A

The information about the network interface controller (NIC).

TxBytes Long 426

The number of bytes sent by the NIC.

RxBytes Long 0

The number of bytes received by the NIC.

TxErrors Long 0

The number of bytes that the NIC failed to send.

RxErrors Long 0

The number of bytes that the NIC failed to receive.

Name String eth0

The name of the NIC.

Examples

Sample requests

http(s)://eci.aliyuncs.com/? Action=DescribeContainerGroupMetric
&ContainerGroupId=eci-123456
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<DescribeContainerGroupMetricResponse>
      <ContainerGroupId>eci-bp1dqpye03ke5s6p2ijc</ContainerGroupId>
      <Records>
            <Containers>
                  <Name>redis-liu</Name>
                  <Memory>
                        <AvailableBytes>2145820672</AvailableBytes>
                        <UsageBytes>1662976</UsageBytes>
                  </Memory>
                  <CPU>
                        <Load>0</Load>
                        <UsageNanoCores>0</UsageNanoCores>
                        <UsageCoreNanoSeconds>40876694</UsageCoreNanoSeconds>
                        <Limit>1024</Limit>
                  </CPU>
            </Containers>
            <Containers>
                  <Name>nginx-liu</Name>
                  <Memory>
                        <AvailableBytes>2145325056</AvailableBytes>
                        <UsageBytes>2166784</UsageBytes>
                  </Memory>
                  <CPU>
                        <Load>0</Load>
                        <UsageNanoCores>0</UsageNanoCores>
                        <UsageCoreNanoSeconds>43183279</UsageCoreNanoSeconds>
                        <Limit>1024</Limit>
                  </CPU>
            </Containers>
            <Memory>
                  <AvailableBytes>4285091840</AvailableBytes>
                  <UsageBytes>9289728</UsageBytes>
            </Memory>
            <Network>
                  <Interfaces>
                        <Name>eth0</Name>
                        <TxBytes>426</TxBytes>
                        <RxErrors>0</RxErrors>
                        <TxErrors>0</TxErrors>
                        <RxBytes>0</RxBytes>
                  </Interfaces>
            </Network>
            <CPU>
                  <Load>0</Load>
                  <UsageNanoCores>7735803</UsageNanoCores>
                  <UsageCoreNanoSeconds>122380547</UsageCoreNanoSeconds>
                  <Limit>2048</Limit>
            </CPU>
            <Timestamp>2019-03-29T10:38:50.734+08:00</Timestamp>
      </Records>
      <Records>
            <Containers>
                  <Name>nginx-liu</Name>
                  <Memory>
                        <AvailableBytes>2145488896</AvailableBytes>
                        <UsageBytes>2021376</UsageBytes>
                  </Memory>
                  <CPU>
                        <Load>0</Load>
                        <UsageNanoCores>0</UsageNanoCores>
                        <UsageCoreNanoSeconds>43183279</UsageCoreNanoSeconds>
                        <Limit>1024</Limit>
                  </CPU>
            </Containers>
            <Containers>
                  <Name>redis-liu</Name>
                  <Memory>
                        <AvailableBytes>2145910784</AvailableBytes>
                        <UsageBytes>1572864</UsageBytes>
                  </Memory>
                  <CPU>
                        <Load>0</Load>
                        <UsageNanoCores>287628</UsageNanoCores>
                        <UsageCoreNanoSeconds>44680652</UsageCoreNanoSeconds>
                        <Limit>1024</Limit>
                  </CPU>
            </Containers>
            <Memory></Memory>
            <Network>
                  <Interfaces>
                        <Name>eth0</Name>
                        <TxBytes>143562</TxBytes>
                        <RxErrors>0</RxErrors>
                        <TxErrors>0</TxErrors>
                        <RxBytes>20410229</RxBytes>
                  </Interfaces>
            </Network>
            <CPU></CPU>
            <Timestamp>2019-03-29T10:39:05.734+08:00</Timestamp>
      </Records>
      <RequestId>D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC</RequestId>
</DescribeContainerGroupMetricResponse>

JSON format

{
    "ContainerGroupId": "eci-bp1dqpye03ke5s6p2ijc",
    "Records": [
        {
            "Containers": [
                {
                    "Name": "redis-liu",
                    "Memory": {
                        "AvailableBytes": 2145820672,
                        "UsageBytes": 1662976
                    },
                    "CPU": {
                        "Load": 0,
                        "UsageNanoCores": 0,
                        "UsageCoreNanoSeconds": 40876694,
                        "Limit": 1024
                    }
                },
                {
                    "Name": "nginx-liu",
                    "Memory": {
                        "AvailableBytes": 2145325056,
                        "UsageBytes": 2166784
                    },
                    "CPU": {
                        "Load": 0,
                        "UsageNanoCores": 0,
                        "UsageCoreNanoSeconds": 43183279,
                        "Limit": 1024
                    }
                }
            ],
            "Memory": {
                "AvailableBytes": 4285091840,
                "UsageBytes": 9289728
            },
            "Network": {
                "Interfaces": [
                    {
                        "Name": "eth0",
                        "TxBytes": 426,
                        "RxErrors": 0,
                        "TxErrors": 0,
                        "RxBytes": 0
                    }
                ]
            },
            "CPU": {
                "Load": 0,
                "UsageNanoCores": 7735803,
                "UsageCoreNanoSeconds": 122380547,
                "Limit": 2048
            },
            "Timestamp": "2019-03-29T10:38:50.734+08:00"
        },
        {
            "Containers": [
                {
                    "Name": "nginx-liu",
                    "Memory": {
                        "AvailableBytes": 2145488896,
                        "UsageBytes": 2021376
                    },
                    "CPU": {
                        "Load": 0,
                        "UsageNanoCores": 0,
                        "UsageCoreNanoSeconds": 43183279,
                        "Limit": 1024
                    }
                },
                {
                    "Name": "redis-liu",
                    "Memory": {
                        "AvailableBytes": 2145910784,
                        "UsageBytes": 1572864
                    },
                    "CPU": {
                        "Load": 0,
                        "UsageNanoCores": 287628,
                        "UsageCoreNanoSeconds": 44680652,
                        "Limit": 1024
                    }
                }
            ],
            "Memory": {},
            "Network": {
                "Interfaces": [
                    {
                        "Name": "eth0",
                        "TxBytes": 143562,
                        "RxErrors": 0,
                        "TxErrors": 0,
                        "RxBytes": 20410229
                    }
                ]
            },
            "CPU": {},
            "Timestamp": "2019-03-29T10:39:05.734+08:00"
        }
    ],
    "RequestId": "D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC"
}

Error codes