From 8be04f15c94e5c4c061ec6ca7370c451a0f944bc Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Tue, 27 Feb 2024 16:24:54 +0000 Subject: [PATCH] Further Jitbit anomaly alarm tweaks --- terraform/environments/delius-jitbit/monitoring_ecs.tf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/terraform/environments/delius-jitbit/monitoring_ecs.tf b/terraform/environments/delius-jitbit/monitoring_ecs.tf index 91377a16285..36f72dc07df 100644 --- a/terraform/environments/delius-jitbit/monitoring_ecs.tf +++ b/terraform/environments/delius-jitbit/monitoring_ecs.tf @@ -7,7 +7,8 @@ locals { resource "aws_cloudwatch_metric_alarm" "jitbit_cpu_over_threshold" { alarm_name = "jitbit-ecs-cpu-threshold" comparison_operator = "GreaterThanUpperThreshold" - evaluation_periods = "2" + datapoints_to_alarm = "3" + evaluation_periods = "5" threshold_metric_id = "e1" alarm_description = "Triggers alarm if ECS CPU crosses a threshold" insufficient_data_actions = [] @@ -28,7 +29,7 @@ resource "aws_cloudwatch_metric_alarm" "jitbit_cpu_over_threshold" { metric { metric_name = "CPUUtilization" namespace = "AWS/ECS" - period = "120" + period = "60" stat = "Average" dimensions = { @@ -43,7 +44,8 @@ resource "aws_cloudwatch_metric_alarm" "jitbit_cpu_over_threshold" { resource "aws_cloudwatch_metric_alarm" "jitbit_memory_over_threshold" { alarm_name = "jitbit-ecs-memory-threshold" comparison_operator = "GreaterThanUpperThreshold" - evaluation_periods = "2" + datapoints_to_alarm = "3" + evaluation_periods = "5" threshold_metric_id = "e1" alarm_description = "Triggers alarm if ECS memory crosses a threshold" insufficient_data_actions = [] @@ -64,7 +66,7 @@ resource "aws_cloudwatch_metric_alarm" "jitbit_memory_over_threshold" { metric { metric_name = "MemoryUtilization" namespace = "AWS/ECS" - period = "120" + period = "60" stat = "Average" dimensions = {