Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aws/elasticache/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ END
resource "datadog_monitor" "memory_utilization" {
count = var.memory_utilization_enabled ? 1 : 0

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

query = <<END
avg(${var.memory_utilization_evaluation_window}):
avg:aws.elasticache.database_memory_usage_percentage${local.query_filter} by {replication_group,region,aws_account,env,datadog_managed}
avg:aws.elasticache.database_memory_usage_percentage${local.query_filter} by {name,region,aws_account,env,datadog_managed}
>= ${var.memory_utilization_threshold_critical}
END

Expand Down
10 changes: 5 additions & 5 deletions aws/elasticache/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variable "base_tags" {
# Node CPU Utilization
########################################
variable "cpu_utilization_enabled" {
default = false
default = true
description = "Enable CPU utilization monitor"
type = bool
}
Expand All @@ -29,7 +29,7 @@ variable "cpu_utilization_no_data_window" {
}

variable "cpu_utilization_evaluation_window" {
default = "last_5m"
default = "last_15m"
description = "Evaluation window for monitor (`last_?m` (1, 5, 10, 15, or 30), `last_?h` (1, 2, or 4), or `last_1d`]"
type = string
}
Expand All @@ -49,7 +49,7 @@ variable "cpu_utilization_threshold_warning" {
variable "cpu_utilization_use_message" {
description = "Whether to use the query alert base message for CPU utilization monitor"
type = bool
default = false
default = true
}

########################################
Expand Down Expand Up @@ -326,7 +326,7 @@ variable "swap_usage_use_message" {
# Memory Utilization
########################################
variable "memory_utilization_enabled" {
default = false
default = true
description = "Enable memory utilization monitor"
type = bool
}
Expand Down Expand Up @@ -358,5 +358,5 @@ variable "memory_utilization_threshold_warning" {
variable "memory_utilization_use_message" {
description = "Whether to use the query alert base message for memory utilization monitor"
type = bool
default = false
default = true
}
Loading