A SysOps Administrator is configuring a monitoring and remediation solution for a backend service running on Amazon EC2. The service outputs space-delimited logs to an Amazon CloudWatch Logs log group. A typical log entry is formatted as follows:
`api-srv-01 srv-core WARN 500 1200`
The fields, from left to right, represent: `Source`, `Service`, `LogLevel`, `StatusCode`, and `ResponseTimeMs`.
The administrator wants to:
1. Extract `ResponseTimeMs` as a custom metric named `TransactionLatency` in the `BackendApp` namespace.
2. Only count logs where the `LogLevel` is either `WARN` or `ERROR`, and the `StatusCode` is not equal to .
3. Automatically restart the EC2 instance using the Systems Manager Automation document `AWS-RestartEC2Instance` if the average `TransactionLatency` exceeds ms over three consecutive -minute periods.
Which two steps must the SysOps Administrator take to meet these requirements? (Select TWO.)
- Create a CloudWatch Logs metric filter with the pattern `[source, service, level = WARN || level = ERROR, status != 200, latency]` and map the metric value to `$latency`.Cevap
- BCreate a CloudWatch Logs metric filter with the JSON pattern `{ .LogLevel = "ERROR" && .StatusCode != 200 }` and map the metric value to `.ResponseTimeMs`.
- Create a CloudWatch alarm for the `TransactionLatency` metric that evaluates the average value over three consecutive -minute periods, and configure an Amazon EventBridge rule that triggers the `AWS-RestartEC2Instance` Systems Manager Automation document when the alarm transitions to the `ALARM` state.Cevap
- DCreate a CloudWatch alarm for the `TransactionLatency` metric that evaluates the average value over three consecutive -minute periods, and configure the alarm's action to directly execute the `AWS-RestartEC2Instance` Systems Manager Automation document when the alarm transitions to the `ALARM` state.
- EEnable detailed monitoring on the Amazon EC2 instances to decrease the metric filter evaluation and ingestion interval from minutes to minute.
- FModify the log group retention period to days to force CloudWatch Logs to aggregate the custom metric data points at -minute intervals.