hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.73k stars 9.09k forks source link

[New Resource]: Log Anomaly Detector #34788

Open dwaynebailey opened 9 months ago

dwaynebailey commented 9 months ago

Description

Log Groups can be associated with an anomoly detector that search for anomalies in the logs. These anomolies are displayed for further action or the creation of alarms.

These are switched on per log_group or multiple log_groups. They accept a further optional filter pattern. The anomolies are kept for 21 days before being considered normal operational values. Evaluation is done periodically between 1 and 60 minutes, which can be set by the user.

Requested Resource(s) and/or Data Source(s)

Potential Terraform Configuration

resource "aws_cloudwatch_log_anomaly_detector" "example" {
  name = "logs-anomaly-example-detector"
  log_groups = ["arn:aws:logs:xx-xxxx-1:NNNNNNNNN:log-group:/yyyyyy"]
  evaluation_frequency_minutes = 5
  pattern = "{ $.kubernetes.namespace_name = "dev" }"
  anomaly_visibility_day = 21
}

References

Would you like to implement a fix?

No

github-actions[bot] commented 9 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue