DOP-C02 Practice Question 27: CloudWatch Agent Memory Metrics
AWS Certified DevOps Engineer – Professional (DOP-C02) · Test 3 · question 7 of 10
An operations team needs CloudWatch alarms on memory utilization and free disk space for a fleet of Amazon EC2 Linux instances. In the CloudWatch console they can find CPUUtilization, NetworkIn, and EBS metrics for every instance, but no memory or disk-space metric appears anywhere.
What should the team do to collect the metrics they need?
Show answer and explanation
Answer:
EC2 publishes only the metrics the hypervisor can see. Memory usage and filesystem usage live inside the guest operating system, so something has to run on the instance to report them. That is the CloudWatch agent: "If you install the agent on an Amazon EC2 instance, the metrics the agent collects are in addition to the metrics enabled by default on Amazon EC2 instances." Its Linux metric list includes mem_used_percent and disk_used_percent, published to the CWAgent namespace by default, and once they are CloudWatch metrics an ordinary alarm works on them.
Option B changes frequency, not coverage. Detailed monitoring moves the existing AWS/EC2 metrics from five-minute to one-minute periods; it does not add any metric that EC2 could not see before, so memory still will not appear.
Option C targets the wrong workloads. Container Insights collects metrics from Amazon ECS, Amazon EKS, and Kubernetes clusters. It is not a way to get host metrics from a fleet of plain EC2 instances running an application directly.
Option D collects the wrong kind of data. Systems Manager Inventory gathers configuration facts (installed applications, packages, network configuration, patch state) as inventory, on a schedule. It does not emit time-series metrics to CloudWatch, so there is nothing to alarm on.
Reference: Metrics collected by the CloudWatch agent