Skip to content

Commit

Permalink
Revert "Alarm to notify team if there was a failed login of more than…
Browse files Browse the repository at this point in the history
… 10 times (#1004)" (#1008)

This reverts commit 735c664.
  • Loading branch information
jzbahrai authored Nov 6, 2023
1 parent 735c664 commit e351fe7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
16 changes: 1 addition & 15 deletions aws/eks/cloudwatch_alarms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -729,18 +729,4 @@ resource "aws_cloudwatch_metric_alarm" "documentation-evicted-pods" {
alarm_actions = [var.sns_alert_warning_arn]
ok_actions = [var.sns_alert_warning_arn]
insufficient_data_actions = [var.sns_alert_warning_arn]
}

resource "aws_cloudwatch_metric_alarm" "failed-login-count-5-minute-warning" {
alarm_name = "failed-login-count-5-minute-warning"
alarm_description = "One user had a failed login count of more than 10 times in 5 minutes"
comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = "5"
metric_name = aws_cloudwatch_log_metric_filter.failed-login-count-more-than-10[0].name
namespace = aws_cloudwatch_log_metric_filter.failed-login-count-more-than-10[0].metric_transformation[0].namespace
period = 60
statistic = "Sum"
threshold = 1
treat_missing_data = "notBreaching"
alarm_actions = [var.sns_alert_warning_arn]
}
}
15 changes: 1 addition & 14 deletions aws/eks/cloudwatch_log.tf
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,4 @@ resource "aws_cloudwatch_log_metric_filter" "documentation-evicted-pods" {
namespace = "LogMetrics"
value = "1"
}
}

resource "aws_cloudwatch_log_metric_filter" "failed-login-count-more-than-10" {
count = var.cloudwatch_enabled ? 1 : 0
name = "failed-login-count-more-than-10"
pattern = "Failed login: Incorrect password for"
log_group_name = aws_cloudwatch_log_group.notification-canada-ca-eks-application-logs[0].name

metric_transformation {
name = "failed-login-count"
namespace = "LogMetrics"
value = "1"
}
}
}

0 comments on commit e351fe7

Please sign in to comment.