Skip to content

Commit 492ec5c

Browse files
committed
Change elasticache monitor to use name
1 parent ae6a68a commit 492ec5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aws/elasticache/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ END
216216
resource "datadog_monitor" "memory_utilization" {
217217
count = var.memory_utilization_enabled ? 1 : 0
218218

219-
name = join("", [local.title_prefix, "Elasticache Memory Utilization - {{replication_group.name}} - {{value}}%", local.title_suffix])
219+
name = join("", [local.title_prefix, "Elasticache Memory Utilization - {{name.name}} - {{value}}%", local.title_suffix])
220220
include_tags = false
221221
message = var.memory_utilization_use_message ? local.query_alert_base_message : ""
222222
tags = concat(local.common_tags, var.base_tags, var.additional_tags)
@@ -232,7 +232,7 @@ resource "datadog_monitor" "memory_utilization" {
232232

233233
query = <<END
234234
avg(${var.memory_utilization_evaluation_window}):
235-
avg:aws.elasticache.database_memory_usage_percentage${local.query_filter} by {replication_group,region,aws_account,env,datadog_managed}
235+
avg:aws.elasticache.database_memory_usage_percentage${local.query_filter} by {name,region,aws_account,env,datadog_managed}
236236
>= ${var.memory_utilization_threshold_critical}
237237
END
238238

0 commit comments

Comments
 (0)