The following CloudWatch log group is created by default when Container Insights is setup:

  • /aws/ecs/containerinsights/<CLUSTER_NAME>/performance

Also, the application logs are collected under

  • /ecs/

Go to CloudWatch Logs Log Groups page and enter the cluster name in the filter log groups textbox which will filter the log groups and show the results similar to the one below:

ECS Metrics

Click on application log group which will show you different log streams. Select the one that starts with ClusterTelemetry. This is the log group that contains performance metrics at the cluster level.

To see data collected at the ECS Service level, select the Log stream that starts with FargateTelemetry

Along with performance log data, you will also see that there are metrics present in Embedded Metric Format.

Go to Embedded Metric Format (EMF) workshop module in case you want to dive deep into that topic.

To see Metric log data simply enter CloudWatchMetrics (case sensitive) in the Filter events textbox as shown below.

ECS Metrics

Using Logs Insights to query log data

Go to Logs Insights module for a deep dive on this topic.

CloudWatch Logs Insights offers a simple to use, purpose built query language that you can use to query log data from CloudWatch Logs.

On Logs Insights console, select the log group name that contains /ecs/Servicesecstaskdefpayforadoption and use the following query to query log data from the log group.

fields @timestamp, @message
| filter @message like 'In CompleteAdoption'
| sort @timestamp desc
| limit 20

See the following screenshot showing log insights query execution results. The query above selects log data that contain the string In CompleteAdoption in the log message.

EKS LogInsightsQuery