diff --git a/addons/monitoring/.header.md b/addons/monitoring/.header.md index d4653c3..84afcc0 100644 --- a/addons/monitoring/.header.md +++ b/addons/monitoring/.header.md @@ -151,13 +151,13 @@ module "monitoring" { Valid targets for `sns_topic_arns_map`: - acm_certificate_expired - - alb_helthyhosts + - alb_healthyhosts - alb_httpcode_5xx - backend_response_time - cron_monitoring (notifications about failures in the cron scheduler) - cron_job_failure_monitoring (notifications about errors in individual cron jobs - defaults to value of `cron_monitoring`) - log_monitoring - - rds_cpu_untilizaton_too_high + - rds_cpu_utilization_too_high - rds_db_event_subscription - redis_cpu_engine_utilization - redis_cpu_utilization @@ -167,6 +167,11 @@ Valid targets for `sns_topic_arns_map`: If you want to publish to all, use `default_sns_topic_arns` instead and include your notification ARNs there. +Deprecated (typo) aliases are still accepted for backwards compatibility: + + - alb_helthyhosts (use alb_healthyhosts) + - rds_cpu_untilizaton_too_high (use rds_cpu_utilization_too_high) + # Cron Names - apple_mdm_apns_pusher diff --git a/addons/monitoring/README.md b/addons/monitoring/README.md index 9ff9a4e..c6dfa0d 100644 --- a/addons/monitoring/README.md +++ b/addons/monitoring/README.md @@ -151,13 +151,13 @@ module "monitoring" { Valid targets for `sns_topic_arns_map`: - acm\_certificate\_expired - - alb\_helthyhosts + - alb\_healthyhosts - alb\_httpcode\_5xx - backend\_response\_time - cron\_monitoring (notifications about failures in the cron scheduler) - cron\_job\_failure\_monitoring (notifications about errors in individual cron jobs - defaults to value of `cron_monitoring`) - log\_monitoring - - rds\_cpu\_untilizaton\_too\_high + - rds\_cpu\_utilization\_too\_high - rds\_db\_event\_subscription - redis\_cpu\_engine\_utilization - redis\_cpu\_utilization @@ -167,6 +167,11 @@ Valid targets for `sns_topic_arns_map`: If you want to publish to all, use `default_sns_topic_arns` instead and include your notification ARNs there. +Deprecated (typo) aliases are still accepted for backwards compatibility: + + - alb\_helthyhosts (use alb\_healthyhosts) + - rds\_cpu\_untilizaton\_too\_high (use rds\_cpu\_utilization\_too\_high) + # Cron Names - apple\_mdm\_apns\_pusher diff --git a/addons/monitoring/main.tf b/addons/monitoring/main.tf index 649d459..8fca2c1 100644 --- a/addons/monitoring/main.tf +++ b/addons/monitoring/main.tf @@ -10,8 +10,8 @@ resource "aws_cloudwatch_metric_alarm" "cpu_utilization_too_high" { statistic = "Average" threshold = 80 alarm_description = "Average database CPU utilization over last 5 minutes too high" - alarm_actions = lookup(var.sns_topic_arns_map, "rds_cpu_untilizaton_too_high", var.default_sns_topic_arns) - ok_actions = lookup(var.sns_topic_arns_map, "rds_cpu_untilizaton_too_high", var.default_sns_topic_arns) + alarm_actions = lookup(var.sns_topic_arns_map, "rds_cpu_utilization_too_high", lookup(var.sns_topic_arns_map, "rds_cpu_untilizaton_too_high", var.default_sns_topic_arns)) + ok_actions = lookup(var.sns_topic_arns_map, "rds_cpu_utilization_too_high", lookup(var.sns_topic_arns_map, "rds_cpu_untilizaton_too_high", var.default_sns_topic_arns)) dimensions = { DBInstanceIdentifier = each.key } @@ -162,8 +162,8 @@ resource "aws_cloudwatch_metric_alarm" "alb_healthyhosts" { threshold = each.value.min_containers alarm_description = "This alarm indicates the number of Healthy Fleet hosts is lower than expected. Please investigate the load balancer \"${each.value.name}\" or the target group \"${each.value.target_group_name}\" and the fleet backend service \"${each.value.ecs_service_name}\"" actions_enabled = "true" - alarm_actions = lookup(var.sns_topic_arns_map, "alb_helthyhosts", var.default_sns_topic_arns) - ok_actions = lookup(var.sns_topic_arns_map, "alb_helthyhosts", var.default_sns_topic_arns) + alarm_actions = lookup(var.sns_topic_arns_map, "alb_healthyhosts", lookup(var.sns_topic_arns_map, "alb_helthyhosts", var.default_sns_topic_arns)) + ok_actions = lookup(var.sns_topic_arns_map, "alb_healthyhosts", lookup(var.sns_topic_arns_map, "alb_helthyhosts", var.default_sns_topic_arns)) dimensions = { TargetGroup = each.value.target_group_arn_suffix LoadBalancer = each.value.arn_suffix