Go to CloudWatch Container Insights page and select the petsite
(ECS cluster name) in the Filter by cluster
drop down. Your screen should look like the one below. You should also be able to filter any specific object in your cluster just by using the Find resources
textbox.
For example, if you only want to see the ECS Tasks, just type task
and see the table getting filtered.
Click on Map view
which will show the cluster resources in a tree format for easier understanding of resources in the cluster. To see some critical metrics about a resource, just click on the node to see the metrics showing up at the bottom of the screen.
In the screenshot below, the cluster petsite
has been selected and you can see CPU, Memory and Network related metrics aggregated at the cluster level.
Now click on View dashboard
. You will be able to see the automatic dashboards created by CloudWatch Container Insights. For ECS, you can see performance and health metrics at the following levels:
Simply select the level at which you want to see the metrics as shown below and apply filters as required.
As you can notice in the above GIF, you can also see Application and Performance logs for a selected resource.
For example, simply select ECS Services
, and select Services-PayForAdoption
from the Filters
drop down.
In the Task performance
table under the dashboard, select one of the Task definitions and click on Actions
and click Application logs
or Performance logs
which will take you to CloudWatch Logs Insights
screen as shown below.
Notice that the log group automatically selected, timeline selected and a sample query also present there. Simply click on Run query
to see the log data.