Search expressions

Search Expressions

In the previous section, we manually viewed metrics, but this method has limitations and requires multiple interactions with different metrics. In this section, we can perform this more efficiently using Search Expressions.

  1. Remove all information from the old graph by clicking X or Clear graph.

3.2.1

  1. Return to the Browse tab

    • Remove the EBSWriteBytes filter.
    • Add CPUUtilization.
    • Click Graph search.

3.2.2

3.2.3

  1. Go back to the Graphed metrics tab, where a new search expression has appeared in the Details column.

3.2.4

  1. Enter a new expression as shown below. This expression searches in a different Namespace outside EC2.

Then, click Apply to apply the changes.

3.2.5

In the upper-right corner

  • Open the Line dropdown.
  • Select Stacked area.

3.2.6

Now, the graph is easier to read.

3.2.7

  1. Search for the average memory usage percentage (Disk Used Percent)
SEARCH("disk_used_percent", 'Average', 300)

3.2.8

3.2.9

  1. Search using the keyword “used”
SEARCH("used", 'Average', 300)

3.2.10

The results have changed slightly.

3.2.11

Okay, so we have completed the basic search operations in CloudWatch Console. In the next section, we will perform simple calculations.