Skip to content

Commit

Permalink
fix: adjust Superset ECS resources (#206)
Browse files Browse the repository at this point in the history
Increase the vCPU to 2 and raise the alarm threshold for
resource use.
  • Loading branch information
patheard authored Nov 18, 2024
1 parent c31eec1 commit ac977a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions terragrunt/alarms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ locals {
]
superset_error_metric_pattern = "[(w1=\"*${join("*\" || w1=\"*", local.superset_error_filters)}*\") && w1!=\"*${join("*\" && w1!=\"*", local.superset_error_filters_skip)}*\"]"

threshold_ecs_high_cpu = 50
threshold_ecs_high_memory = 50
threshold_ecs_high_cpu = 80
threshold_ecs_high_memory = 80
threshold_lb_response_time = 1
}

Expand All @@ -26,12 +26,12 @@ resource "aws_cloudwatch_metric_alarm" "superset_ecs_high_cpu" {
for_each = { for service in local.ecs_services : service.service_name => service }

alarm_name = "ecs-${each.key}-high-cpu"
alarm_description = "`${each.key}` high CPU use over 2 minutes."
alarm_description = "`${each.key}` high CPU use over 5 minutes."
comparison_operator = "GreaterThanThreshold"
evaluation_periods = "1"
evaluation_periods = "5"
metric_name = "CPUUtilization"
namespace = "AWS/ECS"
period = "120"
period = "60"
statistic = "Maximum"
threshold = local.threshold_ecs_high_cpu
treat_missing_data = "notBreaching"
Expand All @@ -51,12 +51,12 @@ resource "aws_cloudwatch_metric_alarm" "superset_ecs_high_memory" {
for_each = { for service in local.ecs_services : service.service_name => service }

alarm_name = "ecs-${each.key}-high-memory"
alarm_description = "`${each.key}` high memory use over 2 minutes."
alarm_description = "`${each.key}` high memory use over 5 minutes."
comparison_operator = "GreaterThanThreshold"
evaluation_periods = "1"
evaluation_periods = "5"
metric_name = "MemoryUtilization"
namespace = "AWS/ECS"
period = "120"
period = "60"
statistic = "Maximum"
threshold = local.threshold_ecs_high_memory
treat_missing_data = "notBreaching"
Expand Down
2 changes: 1 addition & 1 deletion terragrunt/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module "superset_ecs" {

cluster_name = "superset"
service_name = "superset"
task_cpu = 1024
task_cpu = 2048
task_memory = 8192

# Scaling
Expand Down

0 comments on commit ac977a1

Please sign in to comment.