Skip to content

Commit

Permalink
🔧 Update metric filter pattern for log matching
Browse files Browse the repository at this point in the history
  • Loading branch information
georgepstaylor committed Aug 19, 2024
1 parent 501c7ab commit 01a4780
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ resource "aws_cloudwatch_metric_alarm" "memory_over_threshold" {

resource "aws_cloudwatch_log_metric_filter" "log_error_filter" {
name = "ldap-${var.env_name}-error"
pattern = "%err=[1-9][0-9]+%"
# Pattern to match errors but exclude err=32
pattern = "[%]err=([1-9][0-9]+)[%] (?:(?!err=32).)*"

log_group_name = aws_cloudwatch_log_group.ldap_ecs.name

metric_transformation {
Expand Down

0 comments on commit 01a4780

Please sign in to comment.