Skip to content

Commit

Permalink
chore: update alarm names/descriptions/metric filters to be more accu… (
Browse files Browse the repository at this point in the history
#1131)

* chore: update alarm names/descriptions/metric filters to be more accurate

* chore: get rid of the sqs prefix as it doesnt really make any sense

* chore: renamed things one more time!
  • Loading branch information
andrewleith authored Jan 24, 2024
1 parent c6e119e commit 9876564
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions aws/eks/cloudwatch_alarms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -908,29 +908,29 @@ resource "aws_cloudwatch_metric_alarm" "karpenter-replicas-unavailable" {
}
}

resource "aws_cloudwatch_metric_alarm" "queues-not-active-1-minute-warning" {
resource "aws_cloudwatch_metric_alarm" "aggregating-queues-not-active-1-minute-warning" {
count = var.cloudwatch_enabled ? 1 : 0
alarm_name = "queues-not-active-1-minute-warning"
alarm_description = "Queues have not been active for one minute"
alarm_name = "aggregating-queues-not-active-1-minute-warning"
alarm_description = "Beat inbox tasks have not been active for one minute"
comparison_operator = "LessThanThreshold"
evaluation_periods = "1"
metric_name = aws_cloudwatch_log_metric_filter.queues-are-active[0].metric_transformation[0].name
namespace = aws_cloudwatch_log_metric_filter.queues-are-active[0].metric_transformation[0].namespace
metric_name = aws_cloudwatch_log_metric_filter.aggregating-queues-are-active[0].metric_transformation[0].name
namespace = aws_cloudwatch_log_metric_filter.aggregating-queues-are-active[0].metric_transformation[0].namespace
period = "60"
statistic = "Sum"
threshold = 1
treat_missing_data = "breaching"
alarm_actions = [var.sns_alert_warning_arn]
}

resource "aws_cloudwatch_metric_alarm" "queues-not-active-5-minutes-critical" {
resource "aws_cloudwatch_metric_alarm" "aggregating-queues-not-active-5-minutes-critical" {
count = var.cloudwatch_enabled ? 1 : 0
alarm_name = "queues-not-active-5-minutes-critical"
alarm_description = "Queues have not been active for 5 minutes"
alarm_name = "aggregating-queues-not-active-5-minutes-critical"
alarm_description = "Beat inbox tasks have not been active for 5 minutes"
comparison_operator = "LessThanThreshold"
evaluation_periods = "1"
metric_name = aws_cloudwatch_log_metric_filter.queues-are-active[0].metric_transformation[0].name
namespace = aws_cloudwatch_log_metric_filter.queues-are-active[0].metric_transformation[0].namespace
metric_name = aws_cloudwatch_log_metric_filter.aggregating-queues-are-active[0].metric_transformation[0].name
namespace = aws_cloudwatch_log_metric_filter.aggregating-queues-are-active[0].metric_transformation[0].namespace
period = "300"
statistic = "Sum"
threshold = 1
Expand Down
6 changes: 3 additions & 3 deletions aws/eks/cloudwatch_log.tf
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ resource "aws_cloudwatch_log_metric_filter" "documentation-evicted-pods" {
}
}

resource "aws_cloudwatch_log_metric_filter" "queues-are-active" {
resource "aws_cloudwatch_log_metric_filter" "aggregating-queues-are-active" {
count = var.cloudwatch_enabled ? 1 : 0
name = "queues-are-active"
name = "aggregating-queues-are-active"
pattern = "Batch saving with"
log_group_name = aws_cloudwatch_log_group.notification-canada-ca-eks-application-logs[0].name

metric_transformation {
name = "queues-are-active"
name = "aggregating-queues-are-active"
namespace = "LogMetrics"
value = "1"
}
Expand Down

0 comments on commit 9876564

Please sign in to comment.