Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update alarm names/descriptions/metric filters to be more accu… #1131

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" "beat-inbox-tasks-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 = "beat-inbox-tasks-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.beat-inbox-tasks-are-active[0].metric_transformation[0].name
namespace = aws_cloudwatch_log_metric_filter.beat-inbox-tasks-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" "beat-inbox-tasks-not-active-5-minutes-critical" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep the queue part in the name? beat and tasks are heave on Celery and could be true of other components. A name such as aggregating-queues would carry the meaning. We can talk offline when we have 5 minutes?

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 = "beat-inbox-tasks-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.beat-inbox-tasks-are-active[0].metric_transformation[0].name
namespace = aws_cloudwatch_log_metric_filter.beat-inbox-tasks-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" "beat-inbox-tasks-are-active" {
count = var.cloudwatch_enabled ? 1 : 0
name = "queues-are-active"
name = "beat-inbox-tasks-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 = "beat-inbox-tasks-are-active"
namespace = "LogMetrics"
value = "1"
}
Expand Down
Loading