Question 26
Domain 4: Monitoring and LoggingA DevOps engineer deploys an application to a fleet of Amazon Linux EC2 instances. The DevOps engineer needs to monitor system metrics across the fleet. The DevOps engineer wants to monitor the relationship between network traffic and memory utilization for the application code. The DevOps engineer wants to track the data on a 60 second interval. Which solution will meet these requirements?
Correct answer: C
Explanation
Amazon CloudWatch detailed monitoring publishes EC2 metrics at a 1-minute interval, which matches the required "60 second interval" for NetworkIn. The CloudWatch agent can collect memory data such as "mem_used" from Amazon Linux instances, and CloudWatch graphs let you compare network traffic and memory utilization across the fleet.
Why each option is right or wrong
A. Use Amazon CloudWatch basic monitoring to collect the NetworkIn metric and the MemoryBytesUsed metric. Graph the metrics in CloudWatch.
Basic monitoring is typically 5-minute granularity, so it misses the 60-second requirement.
B. Use Amazon CloudWatch detailed monitoring to collect the NetworkIn metric and the MemoryBytesUsed metric. Graph the metrics in CloudWatch.
MemoryBytesUsed is not a standard built-in EC2 metric; memory usually requires the CloudWatch agent.
C. Use Amazon CloudWatch detailed monitoring to collect the NetworkIn metric. Install the CloudWatch agent on the EC2 instances to collect the mem_used metric. Graph the metrics in CloudWatch.
Amazon EC2 basic monitoring publishes instance metrics at 5-minute intervals, but CloudWatch detailed monitoring publishes them at 1-minute intervals, which satisfies the required 60-second cadence for NetworkIn under the Amazon CloudWatch metrics model. Memory utilization is not a native EC2 metric, so the CloudWatch agent must be installed on the Amazon Linux instances to publish a custom memory metric such as mem_used; once both metrics are in CloudWatch, they can be graphed together to compare network traffic and memory usage across the fleet.
D. Use Amazon CloudWatch basic monitoring to collect the built-in NetworkIn metric. Install the CloudWatch agent on the EC2 instances to collect the mem_used metric. Graph the metrics in CloudWatch.
CloudWatch agent solves memory collection, but basic monitoring still does not provide 60-second NetworkIn data.