A SysOps Administrator is troubleshooting an Amazon CloudWatch alarm configured to monitor a custom application metric named `ProcessingErrors` across a fleet of Amazon EC2 instances. The application code publishes this metric to CloudWatch with two dimensions: `InstanceId` and `Environment`. The CloudWatch alarm is configured to monitor the `ProcessingErrors` metric filtering by the `Environment` dimension only, in order to alert on the total aggregate error count. However, the alarm remains in the `INSUFFICIENT_DATA` state. Which of the following actions should the SysOps Administrator take to resolve this issue? (Select TWO.)
- Modify the application code to publish the metric using only the `Environment` dimension, omitting the `InstanceId` dimension.Cevap
- Update the CloudWatch alarm to use a Metric Math expression with the `SEARCH` function to query and aggregate the metrics across all instances for the specified environment.Cevap
- CEnable detailed monitoring for the EC2 instances in the Auto Scaling group to ensure custom metrics are aggregated at 1-minute intervals.
- DCreate an Amazon EventBridge rule that triggers when the alarm enters the `INSUFFICIENT_DATA` state and configure it to run an AWS Systems Manager Automation document that aggregates the metric dimensions.
- EIncrease the Auto Scaling group cooldown period to give the CloudWatch metric aggregator sufficient time to compile the multi-dimensional metric data.
Cevap
To resolve the dimension mismatch and aggregate the metric, the SysOps Administrator must either modify the application code to publish the metric with only the `Environment` dimension, or update the CloudWatch alarm to use a Metric Math expression with the `SEARCH` function to aggregate the metrics across all instances.
CloudWatch treats metrics with different dimension sets as distinct metrics. Therefore, a metric published with both an instance ID and an environment cannot be retrieved using only the environment dimension. Modifying the application code to publish the metric without the instance ID dimension, or updating the alarm to use a Metric Math expression with the search function to dynamically sum the metrics resolves this issue.
Adım Adım Çözüm
Anahtar Kavram
CloudWatch Custom Metric Dimensions and Aggregation
Tahmini Süre:2m 0s