2

I am running a .NET 6 container in ECS Fargate. My task definition defines the task size:

Task Memory: 1024
Task CPU: 512

The task has 2 containers running - the service and the envoy proxy. The containers define the following:

.NET Service
CPU Units: 0
Hard/Soft memory limits: --/--

Envoy
CPU Units: 0
Hard/Soft memory limits: 500/--

The the ECS Portal, the service shows the CPUUtilization metric in the following graph: enter image description here

This graph seems to indicate that CPU utilization is quite low.

I have a CloudWatch alarm configured for when the Average CpuUtilized of the service goes over 90%, however it seems to alarm despite the other metrics indicating very low utilization.

enter image description here

Container Insights also shows low utilization.

enter image description here

I suspect it could be due to not specifying the CPU Units for the task containers. How can I ensure the metric used for the CloudWatch is consistent with other insights and metrics?

Edit

Even when specifying the CPU Units for each container in the task, I have the same inconsistency.

1 Answer 1

1

The ECS/ContainerInsights CpuUtilized metric must be used in conjunction with the CpuReserved metric when creating an alarm.

enter image description here

Alternatively, the alarm can be created using the AWS/ECS CpuUtilization metric.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .