From 45f926df6ef35e9e500b3521fa6cde633803b233 Mon Sep 17 00:00:00 2001 From: vivid-cpreston <97257824+vivid-cpreston@users.noreply.github.com> Date: Mon, 15 May 2023 12:51:49 -0700 Subject: [PATCH] Alarm sensitivity (#717) * Updated runner used in github actions * Increased sensitivity of alarm triggering horizontal scaling --- terraform/autoscaling.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/terraform/autoscaling.tf b/terraform/autoscaling.tf index a214cb786d..c694a4b867 100644 --- a/terraform/autoscaling.tf +++ b/terraform/autoscaling.tf @@ -102,12 +102,12 @@ resource "aws_appautoscaling_policy" "wfnews_apisix_down" { resource "aws_cloudwatch_metric_alarm" "wfnews_service_cpu_high" { alarm_name = "wfnews_cpu_utilization_high" comparison_operator = "GreaterThanOrEqualToThreshold" - evaluation_periods = "2" + evaluation_periods = "1" metric_name = "CPUUtilization" namespace = "AWS/ECS" period = "60" statistic = "Average" - threshold = "85" + threshold = "50" dimensions = { ClusterName = aws_ecs_cluster.wfnews_main.name @@ -122,12 +122,12 @@ resource "aws_cloudwatch_metric_alarm" "wfnews_service_cpu_high" { resource "aws_cloudwatch_metric_alarm" "wfnews_apisix_service_cpu_high" { alarm_name = "wfnews_apisix_cpu_utilization_high" comparison_operator = "GreaterThanOrEqualToThreshold" - evaluation_periods = "2" + evaluation_periods = "1" metric_name = "CPUUtilization" namespace = "AWS/ECS" period = "60" statistic = "Average" - threshold = "85" + threshold = "50" dimensions = { ClusterName = aws_ecs_cluster.wfnews_main.name @@ -255,12 +255,12 @@ resource "aws_cloudwatch_metric_alarm" "wfnews_client_service_cpu_low" { resource "aws_cloudwatch_metric_alarm" "wfnews_client_service_cpu_high" { alarm_name = "wfnews_client_cpu_utilization_high" comparison_operator = "GreaterThanOrEqualToThreshold" - evaluation_periods = "2" + evaluation_periods = "1" metric_name = "CPUUtilization" namespace = "AWS/ECS" period = "60" statistic = "Average" - threshold = "85" + threshold = "50" dimensions = { ClusterName = aws_ecs_cluster.wfnews_main.name