Skill 4.1.4

Collecting custom metrics (for example, using the CloudWatch agent)

Key Concepts

The unified CloudWatch agent collects system metrics (memory, disk, swap, netstat, processes via procstat) and log files from EC2 and on-premises servers, and receives StatsD and collectd metrics. Its JSON configuration is usually stored in Parameter Store and deployed with Systems Manager. It needs the CloudWatchAgentServerPolicy permissions.

Applications can publish metrics with PutMetricData (standard or high resolution), or more efficiently with the embedded metric format, which writes structured logs that CloudWatch extracts as metrics. Container Insights and Lambda Insights collect detailed container and function metrics.