Skip to content

Commit

Permalink
Merge branch 'main' into fix/callback-failure-queries
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbahrai authored Oct 1, 2024
2 parents 8b44986 + ff2ef9e commit 913f823
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/infrastructure_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.16.21
2.16.24
2 changes: 1 addition & 1 deletion .github/workflows/ossf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@6c4912ed9e5f80cfda40164b92753f21f0892cab
uses: ossf/scorecard-action@72803a12483ed6f4f7c34f804818169f50162e37
with:
results_file: ossf-results.json
results_format: json
Expand Down
32 changes: 31 additions & 1 deletion aws/eks/cloudwatch_alarms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ resource "aws_cloudwatch_metric_alarm" "service-callback-too-many-failures-warni

resource "aws_cloudwatch_metric_alarm" "service-callback-too-many-failures-critical" {
count = var.cloudwatch_enabled ? 1 : 0
alarm_name = "service-callback-too-many-failures-warning"
alarm_name = "service-callback-too-many-failures-critical"
alarm_description = "Service reached the max number of callback retries 100 times in 10 minutes"
comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = "1"
Expand All @@ -984,3 +984,33 @@ resource "aws_cloudwatch_metric_alarm" "service-callback-too-many-failures-criti
treat_missing_data = "notBreaching"
alarm_actions = [var.sns_alert_critical_arn]
}

resource "aws_cloudwatch_metric_alarm" "throttling-exception-warning" {
count = var.cloudwatch_enabled ? 1 : 0
alarm_name = "throttling-exception-warning"
alarm_description = "Have received a throttling exception in the last minute"
comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = "1"
metric_name = aws_cloudwatch_log_metric_filter.throttling-exceptions[0].metric_transformation[0].name
namespace = aws_cloudwatch_log_metric_filter.throttling-exceptions[0].metric_transformation[0].namespace
period = 60
statistic = "Sum"
threshold = 1
treat_missing_data = "notBreaching"
alarm_actions = [var.sns_alert_warning_arn]
}

resource "aws_cloudwatch_metric_alarm" "many-throttling-exceptions-warning" {
count = var.cloudwatch_enabled ? 1 : 0
alarm_name = "many-throttling-exceptions-warning"
alarm_description = "Have received 100 throttling exception in the last minute"
comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = "1"
metric_name = aws_cloudwatch_log_metric_filter.throttling-exceptions[0].metric_transformation[0].name
namespace = aws_cloudwatch_log_metric_filter.throttling-exceptions[0].metric_transformation[0].namespace
period = 60
statistic = "Sum"
threshold = 100
treat_missing_data = "notBreaching"
alarm_actions = [var.sns_alert_warning_arn]
}
13 changes: 13 additions & 0 deletions aws/eks/cloudwatch_log.tf
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,16 @@ resource "aws_cloudwatch_log_metric_filter" "callback-request-failures" {
value = "1"
}
}

resource "aws_cloudwatch_log_metric_filter" "throttling-exceptions" {
count = var.cloudwatch_enabled ? 1 : 0
name = "throttling-exceptions"
pattern = "ThrottlingException"
log_group_name = aws_cloudwatch_log_group.notification-canada-ca-eks-application-logs[0].name

metric_transformation {
name = "throttling-exceptions"
namespace = "LogMetrics"
value = "1"
}
}

0 comments on commit 913f823

Please sign in to comment.