具有增强型可观测性的 Amazon ECS Container Insights - Amazon CloudWatch
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

具有增强型可观测性的 Amazon ECS Container Insights

下表列出了具有增强型可观测性的 Container Insights 针对 Amazon ECS 收集的指标和维度。这些指标位于 ECS/ContainerInsights 命名空间中。有关更多信息,请参阅 指标

如果在控制台中未看到任何 Container Insights 指标,请确保已完成具有增强型可观测性的 Container Insights 的设置。在完全设置具有增强型可观测性的 Container Insights 之前,指标不会显示。有关更多信息,请参阅 设置具有增强型可观测性的 Container Insights

以下指标适用于所有启动类型。

指标名称 Dimensions 描述

ContainerInstanceCount

ClusterName

注册到集群的运行 Amazon ECS 代理的 EC2 实例的数目。

仅针对在集群中运行 Amazon ECS 任务的容器实例收集此指标。对于没有任何 Amazon ECS 任务的空容器实例,不会收集此指标。

单位:计数

ContainerCpuUtilized

ClusterName

ContainerName, TaskId, ServiceName, ClusterName

ContainerName, TaskDefinitionFamily, ClusterName, TaskId

TaskDefinitionFamily, ClusterName, ContainerName

ServiceName, ClusterName, ContainerName

您正在使用的维度集指定资源中容器使用的 CPU 单元。

仅针对在任务定义中具有已定义的 CPU 预留的容器收集此指标。

单位:无

ContainerCpuReserved

ClusterName

ContainerName, TaskId, ServiceName, ClusterName

ContainerName, TaskDefinitionFamily, ClusterName, TaskId

TaskDefinitionFamily, ClusterName, ContainerName

ServiceName, ClusterName, ContainerName

您正在使用的维度集指定资源中容器预留的 CPU 单元。

仅针对在任务定义中具有已定义的 CPU 预留的容器收集此指标。

单位:无

ContainerCpuUtilization

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

您正在使用的维度集指定资源中容器正在使用的 CPU 单元总百分比。

单位:百分比

ContainerMemoryUtilized

ClusterName

ContainerName, TaskId, ServiceName, ClusterName

ContainerName, TaskDefinitionFamily, ClusterName, TaskId

TaskDefinitionFamily, ClusterName, ContainerName

ServiceName, ClusterName, ContainerName

您正在使用的维度集指定资源中容器正在使用的内存。

仅针对在任务定义中具有已定义的内存预留的容器收集此指标。

单位:兆字节

ContainerMemoryReserved

ClusterName

ContainerName, TaskId, ServiceName, ClusterName

ContainerName, TaskDefinitionFamily, ClusterName, TaskId

TaskDefinitionFamily, ClusterName, ContainerName

ServiceName, ClusterName, ContainerName

您正在使用的维度集指定资源中容器预留的内存。

仅针对在任务定义中具有已定义的内存预留的容器收集此指标。

单位:兆字节

ContainerMemoryUtilization

ClusterName

ContainerName, TaskId, ServiceName, ClusterName

ContainerName, TaskDefinitionFamily, ClusterName, TaskId

TaskDefinitionFamily, ClusterName, ContainerName

ServiceName, ClusterName, ContainerName

您正在使用的维度集指定资源中容器正在使用的内存总百分比。

单位:百分比

ContainerNetworkRxBytes

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

您正在使用的维度指定容器接收的字节数。该指标是从 Docker 运行时系统获取的。

此指标仅适用于使用 awsvpcbridge 网络模式的任务中的容器。

单位:字节/秒

ContainerNetworkTxBytes

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

您正在使用的维度指定容器传输的字节数。该指标是从 Docker 运行时系统获取的。

此指标仅适用于使用 awsvpcbridge 网络模式的任务中的容器。

单位:字节/秒

ContainerStorageReadBytes

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

从您正在使用的维度指定资源中容器上存储读取的字节数。这不包括存储设备的读取字节数。该指标是从 Docker 运行时系统获取的。

单位:字节

ContainerStorageWriteBytes

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

写入到您正在使用的维度指定容器中存储的字节数。该指标是从 Docker 运行时系统获取的。

单位:字节

CpuUtilized

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

任务在您使用的维度集所指定的资源中使用的 CPU 单元。

仅针对在任务定义中具有已定义的 CPU 保留的任务收集此指标。

单位:无

CpuReserved

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

任务在您使用的维度集所指定的资源中预留的 CPU 单元。

仅针对在任务定义中具有已定义的 CPU 保留的任务收集此指标。

单位:无

DeploymentCount

ServiceName, ClusterName

Amazon ECS 服务中的部署数。

单位:计数

DesiredTaskCount

ServiceName, ClusterName

Amazon ECS 服务所需的任务数。

单位:计数

EBSFilesystemSize

ClusterName ,TaskDefinitionFamily, VolumeName

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

分配给您使用的维度所指定资源的 Amazon EBS 文件系统存储总量,以千兆字节(GB)为单位。

该指标仅适用于使用平台版本 1.4.0 在 Fargate 上运行的 Amazon ECS 基础设施上运行的任务,或在使用容器代理版本 1.79.0 或更高版本的 Amazon EC2 实例上运行的任务。

单位:千兆字节(GB)

EBSFilesystemUtilized

ClusterName ,TaskDefinitionFamily, VolumeName

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

您使用的维度所指定资源使用的 Amazon EBS 文件系统存储总量,以千兆字节(GB)为单位。

该指标仅适用于使用平台版本 1.4.0 在 Fargate 上运行的 Amazon ECS 基础设施上运行的任务,或在使用容器代理版本 1.79.0 或更高版本的 Amazon EC2 实例上运行的任务。

对于在 Fargate 上运行的任务,Fargate 会在磁盘上预留仅供 Fargate 使用的空间。Fargate 使用的空间不会产生任何成本,但可以使用类似 df 的工具看到额外的存储空间。

单位:千兆字节(GB)

EphemeralStorageReserved 1

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

从您使用的维度所指定的资源中临时存储保留的字节数。临时存储用于容器根文件系统以及容器映像和任务定义中所定义的任何绑定装载主机卷。无法在正在运行的任务中更改临时存储量。

该指标仅适用于在 Fargate Linux 平台 1.4.0 或更高版本上运行的任务。

单位:千兆字节(GB)

MemoryUtilized

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

任务在您使用的维度集所指定的资源中使用的内存。

仅针对在任务定义中具有已定义的内存保留的任务收集此指标。

单位:兆字节

MemoryReserved

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

任务在您使用的维度集所指定的资源中预留的内存。

仅针对在任务定义中具有已定义的内存保留的任务收集此指标。

单位:兆字节

NetworkRxBytes

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

您使用的维度所指定的资源接收的字节数。该指标是从 Docker 运行时系统获取的。

此指标仅适用于使用 awsvpcbridge 网络模式的任务中的容器。

单位:字节/秒

NetworkTxBytes

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

您使用的维度所指定的资源传输的字节数。该指标是从 Docker 运行时系统获取的。

此指标仅适用于使用 awsvpcbridge 网络模式的任务中的容器。

单位:字节/秒

PendingTaskCount

ServiceName, ClusterName

当前处于 PENDING 状态的任务的数量。

单位:计数

RunningTaskCount

ServiceName, ClusterName

当前处于 RUNNING 状态的任务的数量。

单位:计数

RestartCount

ClusterName

ClusterName, ServiceName

ClusterName, TaskDefinitionFamily

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

Amazon ECS 任务中容器重新启动的次数。

仅会对启用了重启策略的容器收集此指标。

单位:计数

ServiceCount

ClusterName

集群中的服务数。

单位:计数

StorageReadBytes

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

从您使用之维度所指定资源中实例上的存储读取的字节数。这不包括存储设备的读取字节数。该指标是从 Docker 运行时系统获取的。

单位:字节

StorageWriteBytes

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

写入到您使用的维度所指定的资源中的存储的字节数。该指标是从 Docker 运行时系统获取的。

单位:字节

TaskCount

ClusterName

正在集群中运行的任务数。

单位:计数

TaskCPUUtilization

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

任务使用的 CPU 单元的总百分比。

单位:百分比

TaskEphemeralStorageUtilization

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

任务使用的临时存储总百分比。

单位:百分比

TaskMemoryUtilization

TaskDefinitionFamily, ClusterName

ServiceName, ClusterName

ClusterName

ClusterName, ServiceName, TaskId

ClusterName, TaskDefinitionFamily, TaskId

任务使用的内存总百分比。

单位:百分比

TaskSetCount

ServiceName, ClusterName

服务中设置的任务数。

单位:计数

注意

EphemeralStorageReservedEphemeralStorageUtilized 指标仅适用于在 Fargate Linux 平台 1.4.0 或更高版本上运行的任务。

Fargate 可保留磁盘空间。该磁盘空间仅由 Fargate 使用。您无需为此付费。它没有显示在这些指标中。但是,您可以在 df 等其他工具中看到这种额外的存储空间。

完成部署 CloudWatch 代理以收集 Amazon ECS 上的 EC2 实例级别指标中的步骤并使用 EC2 启动类型后,以下指标将可用。

指标名称 Dimensions 描述

instance_cpu_limit

ClusterName

可分配给集群中单个 EC2 实例的 CPU 单元最大数目。

单位:无

instance_cpu_reserved_capacity

ClusterName

InstanceId, ContainerInstanceId, ClusterName

集群中单个 EC2 实例上当前预留的 CPU 的百分比。

单位:百分比

instance_cpu_usage_total

ClusterName

集群中单个 EC2 实例上正在使用的 CPU 单元的数目。

单位:无

instance_cpu_utilization

ClusterName

InstanceId, ContainerInstanceId, ClusterName

集群中单个 EC2 实例上正在使用的 CPU 单元的总百分比。

单位:百分比

instance_filesystem_utilization

ClusterName

InstanceId, ContainerInstanceId, ClusterName

集群中单个 EC2 实例上正在使用的文件系统容量的总百分比。

单位:百分比

instance_memory_limit

ClusterName

可分配给此集群中单个 EC2 实例的最大内存量(以字节为单位)。

单位:字节

instance_memory_reserved_capacity

ClusterName

InstanceId, ContainerInstanceId, ClusterName

集群中单个 EC2 实例上当前预留的内存百分比。

单位:百分比

instance_memory_utilization

ClusterName

InstanceId, ContainerInstanceId, ClusterName

集群中单个 EC2 实例上正在使用的内存总百分比。

单位:百分比

instance_memory_working_set

ClusterName

集群中单个 EC2 实例上正在使用的内存量(以字节为单位)。

单位:字节

instance_network_total_bytes

ClusterName

集群中单个 EC2 实例上通过网络传输和接收的每秒总字节数。

单位:字节/秒

instance_number_of_running_tasks

ClusterName

集群中单个 EC2 实例上正在运行的任务数。

单位:计数