Amazon ECS CloudWatch metrics
You can use CloudWatch usage metrics to provide visibility into your accounts usage of resources. Use these metrics to visualize your current service usage on CloudWatch graphs and dashboards.
CPUReservation
-
The percentage of CPU units that are reserved in the cluster or service.
The CPU reservation ( filtered by
ClusterName
) is measured as the total CPU units that are reserved by Amazon ECS tasks on the cluster, divided by the total CPU units for all of the Amazon EC2 instances registered in the cluster. Only Amazon EC2 instances inACTIVE
orDRAINING
status will affect CPU reservation metrics. The metric is only supported for tasks hosted on an Amazon EC2 instance.Valid dimensions:
ClusterName
.Useful statistics: Average, Minimum, Maximum
Unit: Percent.
CPUUtilization
-
The percentage of CPU units that is used by the cluster or service.
The cluster-level CPU utilization ( filtered by
ClusterName
) is measured as the total CPU units that are in use by Amazon ECS tasks on the cluster, divided by the total CPU units for all of the Amazon EC2 instances registered in the cluster. Only Amazon EC2 instances inACTIVE
orDRAINING
status will affect CPU reservation metrics. The cluster-level metric is only supported for tasks hosted on an Amazon EC2 instance.The service-level CPU utilization ( filtered by
ClusterName
,ServiceName
) is measured as the total CPU units in use by the tasks that belong to the service, divided by the total number of CPU units that are reserved for the tasks that belong to the service. The service-level metric is supported for tasks hosted on Amazon EC2 instances and Fargate.Valid dimensions:
ClusterName
,ServiceName
.Useful statistics: Average, Minimum, Maximum
Unit: Percent.
MemoryReservation
-
The percentage of memory that is reserved by running tasks in the cluster.
Cluster memory reservation is measured as the total memory that is reserved by Amazon ECS tasks on the cluster, divided by the total amount of memory for all of the Amazon EC2 instances registered in the cluster. This metric can only be filtered by
ClusterName
. Only Amazon EC2 instances inACTIVE
orDRAINING
status will affect memory reservation metrics. The cluster level memory reservation metric is only supported for tasks hosted on an Amazon EC2 instance.Note
When calculating memory utilization, if
MemoryReservation
is specified, it's used in the calculation instead of total memory.Valid dimensions:
ClusterName
.Useful statistics: Average, Minimum, Maximum
Unit: Percent.
MemoryUtilization
-
The percentage of memory in use by the cluster or service.
The cluster-level memory utilization (filtered by
ClusterName
) is measured as the total memory in use by Amazon ECS tasks on the cluster, divided by the total memory for all of the Amazon EC2 instances registered in the cluster. Only Amazon EC2 instances inACTIVE
orDRAINING
status will affect memory utilization metrics. The cluster-level metric is only supported for tasks hosted on an Amazon EC2 instance.The service-level memory utilization (filtered by
ClusterName
,ServiceName
) is measured as the total memory in use by the tasks that belong to the service, divided by the total memory reserved for the tasks that belong to the service. The service-level metric is supported for tasks hosted on Amazon EC2 instances and Fargate.Valid dimensions:
ClusterName
,ServiceName
.Useful statistics: Average, Minimum, Maximum
Unit: Percent.
EBSFilesystemUtilization
-
The percentage of the Amazon EBS filesystem that is used by tasks in a service.
The service level EBS filesystem utilization metric (filtered by
ClusterName
,ServiceName
) is measured as the total amount of the EBS filesystem in use by the tasks that belong to the service, divided by the total amount of EBS filesystem storage that is allocated for all tasks that belong to the service. The service level EBS filesystem utilization metric is only available for tasks hosted on Amazon EC2 instances (using container agent version1.79.0
) and Fargate (using platform version1.4.0
) that have an EBS volume attached.Note
For tasks hosted on Fargate, there is space on the disk that is only used by Fargate. There is no cost associated with the space Fargate uses, but you will see this additional storage using tools like
df
.Valid dimensions:
ClusterName, ServiceName
.Useful statistics: Average, Minimum, Maximum
Unit: Percent.
GPUReservation
-
The percentage of total available GPUs that are reserved by running tasks in the cluster.
The cluster level GPU reservation metric is measured as the number of GPUs reserved by Amazon ECS tasks on the cluster, divided by the total number of GPUs that was available on all of the Amazon EC2 instances with GPUs registered in the cluster. Only Amazon EC2 instances in
ACTIVE
orDRAINING
status will affect GPU reservation metrics.Valid dimensions:
ClusterName
.Useful statistics: Average, Minimum, Maximum
All statistics: Average, Minimum, Maximum, Sum, Sample Count.
Unit: Percent.
ActiveConnectionCount
-
The total number of concurrent connections active from clients to the Amazon ECS Service Connect proxies that run in tasks that share the selected
DiscoveryName
.This metric is only available if you have configured Amazon ECS Service Connect.
Valid dimensions:
DiscoveryName
andDiscoveryName, ServiceName, ClusterName
.Useful statistics: Average, Minimum, Maximum, Sum.
Unit: Count.
NewConnectionCount
-
The total number of new connections established from clients to the Amazon ECS Service Connect proxies that run in tasks that share the selected
DiscoveryName
.This metric is only available if you have configured Amazon ECS Service Connect.
Valid dimensions:
DiscoveryName
andDiscoveryName, ServiceName, ClusterName
.Useful statistics: Average, Minimum, Maximum, Sum.
Unit: Count.
ProcessedBytes
-
The total number of bytes of inbound traffic processed by the Service Connect proxies.
This metric is only available if you have configured Amazon ECS Service Connect.
Valid dimensions:
DiscoveryName
andDiscoveryName, ServiceName, ClusterName
.Useful statistics: Average, Minimum, Maximum, Sum.
Unit: Bytes.
RequestCount
-
The number of inbound traffic requests processed by the Service Connect proxies.
This metric is only available if you have configured Amazon ECS Service Connect.
You also need to configure
appProtocol
in the port mapping in your task definition.Valid dimensions:
DiscoveryName
andDiscoveryName, ServiceName, ClusterName
.Useful statistics: Average, Minimum, Maximum, Sum.
Unit: Count.
GrpcRequestCount
-
The number of gRPC inbound traffic requests processed by the Service Connect proxies.
This metric is only available if you have configured Amazon ECS Service Connect and the
appProtocol
isGRPC
in the port mapping in the task definition.Valid dimensions:
DiscoveryName
andDiscoveryName, ServiceName, ClusterName
.Useful statistics: Average, Minimum, Maximum, Sum.
Unit: Count.
HTTPCode_Target_2XX_Count
-
The number of HTTP response codes with numbers 200 to 299 generated by the applications in these tasks. These tasks are the targets. This metric only counts the responses sent to the Service Connect proxies by the applications in these tasks, not responses sent directly.
This metric is only available if you have configured Amazon ECS Service Connect and the
appProtocol
isHTTP
orHTTP2
in the port mapping in the task definition.Valid dimensions:
TargetDiscoveryName
andTargetDiscoveryName, ServiceName, ClusterName
.Useful statistics: Average, Minimum, Maximum, Sum.
Unit: Count.
HTTPCode_Target_3XX_Count
-
The number of HTTP response codes with numbers 300 to 399 generated by the applications in these tasks. These tasks are the targets. This metric only counts the responses sent to the Service Connect proxies by the applications in these tasks, not responses sent directly.
This metric is only available if you have configured Amazon ECS Service Connect and the
appProtocol
isHTTP
orHTTP2
in the port mapping in the task definition.Valid dimensions:
TargetDiscoveryName
andTargetDiscoveryName, ServiceName, ClusterName
.Useful statistics: Average, Minimum, Maximum, Sum.
Unit: Count.
HTTPCode_Target_4XX_Count
-
The number of HTTP response codes with numbers 400 to 499 generated by the applications in these tasks. These tasks are the targets. This metric only counts the responses sent to the Service Connect proxies by the applications in these tasks, not responses sent directly.
This metric is only available if you have configured Amazon ECS Service Connect and the
appProtocol
isHTTP
orHTTP2
in the port mapping in the task definition.Valid dimensions:
TargetDiscoveryName
andTargetDiscoveryName, ServiceName, ClusterName
.Useful statistics: Average, Minimum, Maximum, Sum
Unit: Count.
HTTPCode_Target_5XX_Count
-
The number of HTTP response codes with numbers 500 to 599 generated by the applications in these tasks. These tasks are the targets. This metric only counts the responses sent to the Service Connect proxies by the applications in these tasks, not responses sent directly.
This metric is only available if you have configured Amazon ECS Service Connect and the
appProtocol
isHTTP
orHTTP2
in the port mapping in the task definition.Useful statistics: Average, Minimum, Maximum, Sum.
Unit: Count.
RequestCountPerTarget
-
The average number of requests received by each target that share the selected
DiscoveryName
.This metric is only available if you have configured Amazon ECS Service Connect.
Valid dimensions:
TargetDiscoveryName
andTargetDiscoveryName, ServiceName, ClusterName
.Useful statistics: Average.
Unit: Count.
TargetProcessedBytes
-
The total number of bytes processed by the Service Connect proxies.
This metric is only available if you have configured Amazon ECS Service Connect.
Valid dimensions:
TargetDiscoveryName
andTargetDiscoveryName, ServiceName, ClusterName
.Useful statistics: Average, Minimum, Maximum, Sum.
Unit: Bytes.
TargetResponseTime
-
The latency of the application request processing. The time elapsed, in milliseconds, after the request reached the Service Connect proxy in the target task until a response from the target application is received back to the proxy.
This metric is only available if you have configured Amazon ECS Service Connect.
Valid dimensions:
TargetDiscoveryName
andTargetDiscoveryName, ServiceName, ClusterName
.Useful statistics: Average, Minimum, Maximum.
All statistics: Average, Minimum, Maximum, Sum, Sample Count.
Unit: Milliseconds.
ClientTLSNegotiationErrorCount
-
The total number of times the TLS connection failed. This metric is only used when TLS is enabled.
This metric is only available if you have configured Amazon ECS Service Connect.
Valid dimensions:
DiscoveryName
andDiscoveryName
,ServiceName
,ClusterName
.Useful statistics: Average, Minimum, Maximum, Sum.
Unit: Count.
TargetTLSNegotiationErrorCount
-
The total number of times the TLS connection failed due to missing client certificates, failed AWS Private CA verifications, or failed SAN verifications. This metric is only used when TLS is enabled.
This metric is only available if you have configured Amazon ECS Service Connect.
Valid dimensions:
ServiceName
,ClusterName
,TargetDiscoveryName
andTargetDiscoveryName
.Useful statistics: Average, Minimum, Maximum, Sum.
Unit: Count.
Dimensions for Amazon ECS metrics
Amazon ECS metrics use the AWS/ECS
namespace and provide metrics for the
following dimensions. Amazon ECS only sends metrics for resources that have tasks in the
RUNNING
state. For example, if you have a cluster with one service in
it but that service has no tasks in a RUNNING
state, there will be no
metrics sent to CloudWatch. If you have two services and one of them has running tasks and the
other doesn't, only the metrics for the service with running tasks would be sent.
ClusterName
-
This dimension filters the data that you request for all resources in a specified cluster. All Amazon ECS metrics are filtered by
ClusterName
. ServiceName
-
This dimension filters the data that you request for all resources in a specified service within a specified cluster.
DiscoveryName
-
This dimension filters the data that you request for traffic metrics to a specified Service Connect discovery name across all Amazon ECS clusters.
Note that a specific port in a running container can have multiple discovery names.
DiscoveryName, ServiceName, ClusterName
-
This dimension filters the data that you request for traffic metrics to a specified Service Connect discovery name across tasks that have this discovery name and that are created by this service in this cluster.
Use this dimension to see the inbound traffic metrics for a specific service, if you have reused the same discovery name in multiple services in different namespaces.
Note that a specific port in a running container can have multiple discovery names.
TargetDiscoveryName
-
This dimension filters the data that you request for traffic metrics to a specified Service Connect discovery name across all Amazon ECS clusters.
Different from
DiscoveryName
, these traffic metrics only measure inbound traffic to thisDiscoveryName
that come from other Amazon ECS tasks that have a Service Connect configuration in this namespace. This includes tasks made by services with either a client-only or client-server Service Connect configuration.Note that a specific port in a running container can have multiple discovery names.
TargetDiscoveryName, ServiceName, ClusterName
-
This dimension filters the data that you request for traffic metrics to a specified Service Connect discovery name but only counts traffic from tasks created by this service in this cluster.
Use this dimension to see the inbound traffic metrics that come from a specific client in another service.
Different from
DiscoveryName, ServiceName, ClusterName
, these traffic metrics only measure inbound traffic to thisDiscoveryName
that come from other Amazon ECS tasks that have a Service Connect configuration in this namespace. This includes tasks made by services with either a client-only or client-server Service Connect configuration.Note that a specific port in a running container can have multiple discovery names.