In the Elastic Container Instance console, you can view monitoring data for your ECI instances, including metrics related to CPU, memory, and network. This topic explains the meaning and calculation methods of ECI monitoring metrics to help you understand how each metric works and support custom development based on this data.
Monitoring metrics overview
When viewing monitoring data for an ECI instance (that is, a container group) in the Elastic Container Instance console, you can filter by time range to view data for a specific hour or real-time data from the past 5 minutes. The following monitoring metrics are available:
-
CPU
Shows CPU utilization—the percentage of CPU used by the instance, with a maximum of 100%.
-
Memory
Shows memory utilization—the percentage of memory used by the instance, with a maximum of 100%.
-
Network
Shows send and receive rates—the average send and receive rates over the specified time window.
-
Disk
Shows disk partition and space data, as follows:
-
Disk partition data: Includes the system partition and data partition. The data partition refers to the cloud disk partition mounted as a data disk.
-
Disk space data: Includes total disk space, used space, free space, and usage percentage.
-
To retrieve monitoring data for ECI instances, call the DescribeContainerGroupMetric or DescribeMultiContainerGroupMetric API operations and use the results for custom calculations. When querying monitoring data, the system returns metrics for both the container group and the individual containers within it:
-
The root node Records in the response struct contains overall container group metrics (CPU, memory, network, and disk).
-
The child node Containers in the response struct contains metrics for each individual container (CPU and memory).
For more information, see DescribeContainerGroupMetric and DescribeMultiContainerGroupMetric.
CPU metric calculation
Calling the OpenAPI operation returns the following raw CPU data:
|
Name |
Type |
Example value |
Description |
|
UsageNanoCores |
Long |
0 |
CPU usage during the sampling window (in nanoseconds). |
|
UsageCoreNanoSeconds |
Long |
70769883 |
Total historical CPU usage. |
|
Load |
Long |
0 |
Average load over the last 10 seconds. |
|
Limit |
Long |
2000 |
CPU usage limit (number of CPU cores × 1000). |
Calculate CPU-related metrics as follows:
-
CPU core utilization = UsageNanoCores / 109
-
CPU utilization = UsageNanoCores / Limit / 106
Memory metric calculation
Calling the OpenAPI operation returns the following raw memory data:
|
Name |
Type |
Example value |
Description |
|
AvailableBytes |
Long |
4289445888 |
Available memory. |
|
UsageBytes |
Long |
11153408 |
Used memory. |
|
Cache |
Long |
7028736 |
Cache. |
|
WorkingSet |
Long |
5521408 |
Current working set memory usage. |
|
Rss |
Long |
1593344 |
Resident Set Size (RSS)—the actual physical memory in use. |
Memory utilization = WorkingSet / (WorkingSet + AvailableBytes)
Network metric calculation
Calling the OpenAPI operation returns the following raw network data:
|
Name |
Type |
Example value |
Description |
|
TxBytes |
Long |
1381805699 |
Cumulative bytes sent. |
|
RxBytes |
Long |
505001954 |
Cumulative bytes received. |
|
TxErrors |
Long |
0 |
Cumulative send errors. |
|
RxErrors |
Long |
0 |
Cumulative receive errors. |
|
TxPackets |
Long |
5158427 |
Cumulative packets sent. |
|
RxPackets |
Long |
4800583 |
Cumulative packets received. |
|
TxDrops |
Long |
0 |
Cumulative packets dropped on send. |
|
RxDrops |
Long |
0 |
Cumulative packets dropped on receive. |
|
Name |
String |
eth0 |
Network interface controller (NIC) name. |
Calculate network-related metrics as follows:
-
Network bandwidth rate (bits per second, bps)
Network bandwidth rate = (Cumulative bytes sent at time B − Cumulative bytes sent at time A) ÷ (seconds between time A and time B) × 8
-
Network throughput (packets per second, pps)
Network throughput = (Cumulative packets sent at time B − Cumulative packets sent at time A) ÷ (seconds between time A and time B)