A DevOps team is using Amazon CloudWatch Logs to collect application logs from multiple EC2 instances. They notice that some log entries are missing and that the CloudWatch agent is consuming high CPU. The log group has a retention policy of 30 days. Which action should the team take to reduce CPU usage without losing log data?
Trap 1: Use JSON format for logs instead of plain text.
Incorrect: Format does not significantly affect CPU.
Trap 2: Set the agent's timezone to UTC.
Incorrect: Timezone setting does not affect CPU.
Trap 3: Change the log group retention policy to 7 days.
Incorrect: Retention does not affect agent CPU usage.
- A
Increase the batch size in the CloudWatch agent configuration.
Correct: Larger batch size reduces API calls and CPU usage.
- B
Use JSON format for logs instead of plain text.
Why it fails: Incorrect: Format does not significantly affect CPU.
- C
Set the agent's timezone to UTC.
Why it fails: Incorrect: Timezone setting does not affect CPU.
- D
Change the log group retention policy to 7 days.
Why it fails: Incorrect: Retention does not affect agent CPU usage.