The CloudWatch log groups that we will be interacting with today were automatically created by Container Insights when it was configured. They are appear in the console with the following syntax:
/aws/ecs/containerinsights/<CLUSTER_NAME>/performance
The application log groups appear with this syntax:
/ecs/<ClusterName>
CloudWatch
.Logs
, click on Log groups
.Filter log groups
search bar, type in Services-PayForAdoption
.This will take you to a page that shows you the different log streams within the log group.
log stream
that begins with ClusterTelemetry
by clicking on the log stream name.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 begins with
FargateTelemetry
.
Type CloudWatchMetrics
(case sensitive) into the Filter events
search box.
Click on an arrow from the first column in the table to expand a log.
Along with the performance log data, you will also see that there are metrics present in Embedded Metric Format.
Visit the Embedded Metric Format (EMF) module if you would like to learn more about EMF.
Your screen should look similar to the screen shot below. From here you can view and analyze the metric log data.
CloudWatch Logs Insights supports a query language that you can use to perform queries on your log groups.
Visit the Logs Insights module for a deeper dive on this topic.
Logs
, click on Insights
.select log group(s)
search/drop down and type Services-PayForAdoption
.fields @timestamp, @message
| filter @message like 'In CompleteAdoption'
| sort @timestamp desc
| limit 20
run query
.Running the query above returns log data that contains the string
In ComleteAdoption
in the log message.
Your screen should look similar to the screenshot shown below.
This concludes this section. You may continue on to the next section.