Using Container Insights Console

Viewing cluster resources

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.

ECS Resources page

Map view

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.

ECS Map view

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:

  • ECS Cluster
  • ECS Nodes
  • ECS Service
  • ECS Tasks

Simply select the level at which you want to see the metrics as shown below and apply filters as required.

ECS Dashboard

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.

ECS Logs

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.

ECS Logs Insights

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.