Management

CloudWatch Insights, Agent, and custom metrics

Queries log data with Logs Insights, collects guest OS metrics with the CloudWatch Agent, and publishes custom metrics.

How it works

The CloudWatch Agent can be installed on EC2 or on-premises servers to collect operating system metrics such as memory and disk space, as well as logs. Applications can publish custom metrics for business measurements. CloudWatch Logs Insights provides interactive queries to search, filter, and aggregate logs during incident analysis.

When to use it

Choose it when the requirement is collect guest metrics, publish an application-specific measurement, query logs, or alert on a threshold.

Real-world example

A gaming company installs the CloudWatch Agent on EC2 to monitor memory and publishes a custom metric for player sessions. When servers slow down, the team uses Logs Insights to query application logs for errors.

Key facts

  • The CloudWatch Agent collects guest operating system metrics like memory and disk swap that hypervisor metrics cannot see.
  • CloudWatch Logs Insights provides an interactive query syntax to search and analyze log groups.
  • Custom metrics can be published via the PutMetricData API with standard or high-resolution frequencies.

Common pitfall

EC2 does not publish guest operating system memory utilization by default. Configure the Agent or another collection method; application logs and custom metrics also require configuration.

Often confused with

CloudWatch includes many AWS service and custom metrics; the Agent adds guest operating system metrics.

References

Prepared by Cloud Quest. Check current behavior and limits in the AWS documentation:

SAA-C03 study guide and learning resources

Keywords you will see in SAA-C03 questions

  • Logs Insights query
  • custom metrics PutMetricData

Understand it for real with 3D models and simulated labs

Connect the concept to a working architecture.

Start learning