How can the SysOps administrator meet this requirement?
Create a custom shell script to extract the dimensions and collect the metrics using the Amazon CloudWatch agent.
Create an Amazon EventBridge (Amazon CloudWatch Events) rule to evaluate the required custom dimensions and send the metrics to Amazon Simple Notification Service (Amazon SNS).
Create an AWS Lambda function to collect the metrics from AWS CloudTrail and send the metrics to an Amazon CloudWatch Logs group.
Create an append_dimensions field in the Amazon CloudWatch agent configuration file to collect the metrics.
Explanations:
Creating a custom shell script is not the recommended way to add custom dimensions to the metrics. The CloudWatch agent provides a built-in way to add dimensions through its configuration, without needing custom scripts.
Amazon EventBridge (formerly CloudWatch Events) is used for event-driven automation and monitoring. It does not directly provide a method for adding custom dimensions to metrics collected by the CloudWatch agent.
AWS Lambda and CloudTrail are not suited for adding custom dimensions to CloudWatch metrics. Lambda can process events but doesn’t interact directly with the CloudWatch agent in this context.
Theappend_dimensionsfield in the CloudWatch agent configuration file allows for adding custom dimensions to the metrics that are collected by the agent, making it the correct solution.