Skip to content

Commit 101399d

Browse files
authored
Merge pull request #14 from rhythmictech/ENGADI-69
add default elasticache monitors
2 parents badc10e + 492ec5c commit 101399d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
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

aws/elasticache/variables.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ variable "base_tags" {
1717
# Node CPU Utilization
1818
########################################
1919
variable "cpu_utilization_enabled" {
20-
default = false
20+
default = true
2121
description = "Enable CPU utilization monitor"
2222
type = bool
2323
}
@@ -29,7 +29,7 @@ variable "cpu_utilization_no_data_window" {
2929
}
3030

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

5555
########################################
@@ -326,7 +326,7 @@ variable "swap_usage_use_message" {
326326
# Memory Utilization
327327
########################################
328328
variable "memory_utilization_enabled" {
329-
default = false
329+
default = true
330330
description = "Enable memory utilization monitor"
331331
type = bool
332332
}
@@ -358,5 +358,5 @@ variable "memory_utilization_threshold_warning" {
358358
variable "memory_utilization_use_message" {
359359
description = "Whether to use the query alert base message for memory utilization monitor"
360360
type = bool
361-
default = false
361+
default = true
362362
}

0 commit comments

Comments
 (0)