Navigating the Interface

Automatic field discovery

CloudWatch can automatically discover fields from your log data.

  1. In the AWS Management Console on the Services menu, click CloudWatch.
  2. In the left navigation menu under Logs, click on Insights.
  3. Select the log group called /aws/containerinsights/petsite/performance from the `Select log group(s) drop down.

Note: You can select more than one log group to query on.

  1. Click run query.
  2. In the right navigation menu, click Fields.

You will see a list of fields that were discovered by CloudWatch automatically as shown below.

Logs Insights8

This allows you to pick and include the fields that you want to query on in the query area using intellisense.

Logs Insights11

Sample queries

Logs Insights also provides sample queries for you to easily get started with.

  1. In the right navigation menu, click Queries.

You will see a list of sample queries sorted into categories such as service or frequency of use. Select a query and click ‘Apply’ on the query you are interested in to use it.

Logs Insights12

Saved queries and query history

You can save your queries into Logs Insights to access them later. Simply click the Save button on the interface and provide a name to it to Save the query. You can also optionally provide a custom name for the folder.

  1. Click the Save button underneath the query editor.
  2. Enter Sample1 for query name.
  3. Select Save.

Logs Insights10

  1. In the right navigation menu, click Queries.

You should now have a query called Sample1 listed under Saved queries.

Logs Insights9

  1. Click the History button underneath the query editor.

Here you can see a history of all the queries you have executed. You will be able to see queries executed by the logged in user whether they are saved queries or not.

Logs Insights9

This concludes the Logs Insights module.