Amazon ECS now publishes container health status as a CloudWatch metric

Amazon ECS Container Health Status Metric
Amazon Elastic Container Service (Amazon ECS) now publishes container health status as a new metric in CloudWatch Container Insights, enhancing observability. This allows customers to track the operational health of their containers through a dedicated CloudWatch metric and create alarms for proactive responses to unhealthy containers.
When a container health check is configured in the container definition of an ECS task definition, Container Insights publishes the UnHealthyContainerHealthStatus metric in the ECS/ContainerInsights namespace. The metric reports 0 for HEALTHY and 1 for UNHEALTHY, and is available across cluster, service, task, and container-level dimensions. Container health state information is also available in embedded metric format (EMF) logs, providing additional context during the UNKNOWN state.
What to do
- Enable Container Insights with enhanced observability on your ECS cluster.
- Configure a container health check in your task definition to start collecting the metric in CloudWatch.
The metric is available in all AWS Regions where Amazon ECS Container Insights is supported. For more information, see the Amazon ECS container health checks documentation and the CloudWatch Container Insights documentation.
Source: AWS release notes
If you need further guidance on AWS, our experts are available at AWS@westloop.io. You may also reach us by submitting the Contact Us form.

.png)

