DOP-C02 · Question #405
A company has a web application that publishes logs that contain metadata for transactions, with a status of success or failure for each log. The logs are in JSON format. The application publishes the
The correct answer is C. Create a CloudWatch metric filter for the log groups with a filter pattern that matches the. A CloudWatch metric filter can directly parse your JSON logs for the "status":"success" field and emit a built-in metric. You then add that metric to a CloudWatch dashboard with a simple graph. This requires no additional compute (no Lambda or OpenSearch), and it provides the cou
Question
A company has a web application that publishes logs that contain metadata for transactions, with a status of success or failure for each log. The logs are in JSON format. The application publishes the logs to an Amazon CloudWatch Logs log group. The company wants to create a dashboard that displays the number of successful transactions. Which solution will meet this requirement with the LEAST operational overhead?
Options
- ACreate an Amazon OpenSearch Service cluster and an OpenSearch Service subscription filter to
- BCreate a CloudWatch subscription filter for the log group that uses an AWS Lambda function.
- CCreate a CloudWatch metric filter for the log groups with a filter pattern that matches the
- DCreate an Amazon Kinesis data stream that is subscribed to the log group. Configure the data
How the community answered
(40 responses)- A13% (5)
- B3% (1)
- C78% (31)
- D8% (3)
Explanation
A CloudWatch metric filter can directly parse your JSON logs for the "status":"success" field and emit a built-in metric. You then add that metric to a CloudWatch dashboard with a simple graph. This requires no additional compute (no Lambda or OpenSearch), and it provides the count of successful transactions with virtually zero operational overhead.
Topics
Community Discussion
No community discussion yet for this question.