diff --git a/terraform/monitoring/panels/docdb/available_memory.libsonnet b/terraform/monitoring/panels/docdb/available_memory.libsonnet index 5981723..7dd653a 100644 --- a/terraform/monitoring/panels/docdb/available_memory.libsonnet +++ b/terraform/monitoring/panels/docdb/available_memory.libsonnet @@ -76,7 +76,10 @@ local mem_alert(vars) = alert.new( value = mem_threshold, ) - .setAlert(mem_alert(vars)) + .setAlert( + vars.environment, + mem_alert(vars) + ) .addTarget(targets.cloudwatch( refId = 'Mem_Min', diff --git a/terraform/monitoring/panels/docdb/cpu.libsonnet b/terraform/monitoring/panels/docdb/cpu.libsonnet index f8c6df3..6fa6803 100644 --- a/terraform/monitoring/panels/docdb/cpu.libsonnet +++ b/terraform/monitoring/panels/docdb/cpu.libsonnet @@ -33,7 +33,10 @@ local cpu_alert(vars) = alert.new( datasource = ds.cloudwatch, ) .configure(defaults.configuration.timeseries) - .setAlert(cpu_alert(vars)) + .setAlert( + vars.environment, + cpu_alert(vars) + ) .addTarget(targets.cloudwatch( refId = 'CPU_Max', diff --git a/terraform/monitoring/panels/docdb/low_mem_op_throttled.libsonnet b/terraform/monitoring/panels/docdb/low_mem_op_throttled.libsonnet index 7ea7d99..2f6702b 100644 --- a/terraform/monitoring/panels/docdb/low_mem_op_throttled.libsonnet +++ b/terraform/monitoring/panels/docdb/low_mem_op_throttled.libsonnet @@ -58,7 +58,10 @@ local ops_alert(vars) = alert.new( ) .configure(_configuration) - .setAlert(ops_alert(vars)) + .setAlert( + vars.environment, + ops_alert(vars) + ) .addTarget(targets.cloudwatch( alias = 'LowMem Num Operations Throttled (Max)', diff --git a/terraform/monitoring/panels/ecs/cpu.libsonnet b/terraform/monitoring/panels/ecs/cpu.libsonnet index 0713c93..cf0a12a 100644 --- a/terraform/monitoring/panels/ecs/cpu.libsonnet +++ b/terraform/monitoring/panels/ecs/cpu.libsonnet @@ -12,12 +12,15 @@ local overrides = defaults.overrides; datasource = ds.cloudwatch, ) .configure(overrides.cpu(defaults.configuration.timeseries)) - .setAlert(defaults.alerts.cpu( - namespace = vars.namespace, - title = 'ECS', - env = vars.environment, - notifications = vars.notifications, - )) + .setAlert( + vars.environment, + defaults.alerts.cpu( + namespace = vars.namespace, + title = 'ECS', + env = vars.environment, + notifications = vars.notifications, + ) + ) .addTarget(targets.cloudwatch( alias = 'CPU (Max)', diff --git a/terraform/monitoring/panels/ecs/memory.libsonnet b/terraform/monitoring/panels/ecs/memory.libsonnet index cbe88fd..067de7d 100644 --- a/terraform/monitoring/panels/ecs/memory.libsonnet +++ b/terraform/monitoring/panels/ecs/memory.libsonnet @@ -12,12 +12,15 @@ local targets = grafana.targets; ) .configure(defaults.overrides.memory(defaults.configuration.timeseries)) - .setAlert(defaults.alerts.memory( - namespace = vars.namespace, - title = 'ECS', - env = vars.environment, - notifications = vars.notifications, - )) + .setAlert( + vars.environment, + defaults.alerts.memory( + namespace = vars.namespace, + title = 'ECS', + env = vars.environment, + notifications = vars.notifications, + ) + ) .addTarget(targets.cloudwatch( alias = 'Memory (Max)', diff --git a/terraform/monitoring/panels/lb/error_5xx.libsonnet b/terraform/monitoring/panels/lb/error_5xx.libsonnet index 3c9ca3b..2a8412d 100644 --- a/terraform/monitoring/panels/lb/error_5xx.libsonnet +++ b/terraform/monitoring/panels/lb/error_5xx.libsonnet @@ -30,6 +30,7 @@ local _configuration = defaults.configuration.timeseries ) .setAlert( + vars.environment, grafana.alert.new( namespace = vars.namespace, name = "%(env)s - 5XX alert" % { env: grafana.utils.strings.capitalize(vars.environment) },