diff --git a/main.tf b/main.tf index 5e8ca20..311d5db 100644 --- a/main.tf +++ b/main.tf @@ -368,7 +368,7 @@ resource "aws_cloudwatch_metric_alarm" "queue_time" { # Requires ECS ContainerInsights to be enabled: aws ecs update-cluster-settings --cluster --settings name=containerInsights,value=enabled # ECS cluster name and service name - alarm_name = "${module.label.id}-sqs-big-up" + alarm_name = "${module.label.id}-sqs-queuetime-up" alarm_description = "Alarm monitors ${var.queue_name} QueueTime = ((Queue Size * Worker Timing) / (number of current tasks * Number Of workers per task))" comparison_operator = "GreaterThanThreshold" evaluation_periods = "1" @@ -376,7 +376,7 @@ resource "aws_cloudwatch_metric_alarm" "queue_time" { alarm_actions = ["${aws_appautoscaling_policy.scale_queuetime_up.arn}"] metric_query { id = "queuetime" - expression = "((visible+notvisible) * ${var.queue_worker_timing}) / (taskcount * ${var.queue_task_worker_count}))" + expression = "((visible+notvisible) * ${var.queue_worker_timing}) / (taskcount * ${var.queue_task_worker_count})" label = "WaitTime" return_data = "true" } diff --git a/variables.tf b/variables.tf index d82abf9..1720840 100644 --- a/variables.tf +++ b/variables.tf @@ -92,7 +92,7 @@ variable "queue_worker_timing" { variable "queue_task_worker_count" { description = "number of Workers per Task in calculation queue_time_threshold" - default = "1" + default = "4" } variable "scale_down_cooldown" {