diff --git a/terraform/environments/delius-core/modules/components/ldap/ecs_monitoring.tf b/terraform/environments/delius-core/modules/components/ldap/ecs_monitoring.tf index 9380e2c6469..e0f405a3fa0 100644 --- a/terraform/environments/delius-core/modules/components/ldap/ecs_monitoring.tf +++ b/terraform/environments/delius-core/modules/components/ldap/ecs_monitoring.tf @@ -75,9 +75,8 @@ resource "aws_cloudwatch_metric_alarm" "memory_over_threshold" { } resource "aws_cloudwatch_log_metric_filter" "log_error_filter" { - name = "ldap-${var.env_name}-error" - # Pattern to match errors but exclude err=32 - pattern = "[%]err=([1-9][0-9]+)[%] (?:(?!err=32).)*" + name = "ldap-${var.env_name}-error" + pattern = "%err=[1-9][0-9]+%" log_group_name = aws_cloudwatch_log_group.ldap_ecs.name @@ -95,7 +94,7 @@ resource "aws_cloudwatch_metric_alarm" "high_error_volume" { namespace = "ldapMetrics" metric_name = "ErrorCount" statistic = "Sum" - period = "300" + period = "600" evaluation_periods = "1" alarm_actions = [var.sns_topic_arn] ok_actions = [var.sns_topic_arn] @@ -104,21 +103,6 @@ resource "aws_cloudwatch_metric_alarm" "high_error_volume" { comparison_operator = "GreaterThanThreshold" } -resource "aws_cloudwatch_metric_alarm" "warning_error_volume" { - alarm_name = "ldap-${var.env_name}-warning-error-count" - alarm_description = "Triggers alarm if there are more than 5 errors in the last 2 minutes" - namespace = "ldapMetrics" - metric_name = "ErrorCount" - statistic = "Sum" - period = "120" - evaluation_periods = "1" - alarm_actions = [var.sns_topic_arn] - ok_actions = [var.sns_topic_arn] - threshold = "5" - treat_missing_data = "missing" - comparison_operator = "GreaterThanThreshold" -} - resource "aws_cloudwatch_metric_alarm" "ecs_running_tasks_less_than_one" { alarm_name = "ldap-${var.env_name}-no-running-tasks" actions_enabled = true