SAP-C02 Question 381
Select 2You are designing a monitoring solution for an application running on Amazon EC2 instances in an Auto Scaling group. The application generates custom metrics that must be tracked and monitored in near real time. Additionally, the solution must allow you to set alarms and automatically respond to anomalies with minimal operational overhead. Which combination of services and configurations meets these requirements?
- A
Use the Amazon CloudWatch agent to collect custom application metrics and publish them to CloudWatch.
- B
Set up CloudWatch Alarms to monitor the custom metrics and trigger Auto Scaling policies for scaling events.
- C
Use AWS Config to track and monitor the custom application metrics.
- D
Enable detailed monitoring for the Auto Scaling group to collect custom application metrics.
- E
Create a CloudWatch Logs Insights query to monitor the custom metrics from CloudWatch Logs.
Show answer and explanation
Correct answers: A, B
Explanation
To monitor custom application metrics in near real time, the CloudWatch agent is used to collect and publish the metrics to CloudWatch. Once the metrics are available in CloudWatch, CloudWatch Alarms can be configured to monitor these metrics and trigger automatic actions, such as scaling events, ensuring a responsive and automated monitoring solution.
- A. Correct.
This is correct. The CloudWatch agent can be configured to collect custom application metrics and publish them to Amazon CloudWatch, enabling near real-time monitoring.
- B. Correct.
This is correct. CloudWatch Alarms can monitor the custom metrics and trigger actions such as Auto Scaling policies, ensuring an automatic response to anomalies.
- C. Incorrect.
This is incorrect. AWS Config is primarily used for compliance and resource configuration tracking, not for monitoring custom metrics.
- D. Incorrect.
This is incorrect. Detailed monitoring for Auto Scaling groups collects system-level metrics (e.g., CPU, Network), but it does not capture custom application metrics.
- E. Incorrect.
This is incorrect. CloudWatch Logs Insights is a tool for querying and analyzing log data, but it is not directly used for monitoring or alarming on custom metrics.