MON-32 add variables for eviction
This commit is contained in:
parent
d8bfbe086d
commit
5357ef68e0
@ -54,16 +54,22 @@ variable "eviction_message" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "eviction_time_aggregator" {
|
||||
description = "Monitor aggregator for Elasticache eviction [available values: min, max or avg]"
|
||||
type = "string"
|
||||
default = "min"
|
||||
}
|
||||
|
||||
variable "eviction_timeframe" {
|
||||
description = "Monitor timeframe for Elasticache eviction [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||
type = "string"
|
||||
default = "last_5m"
|
||||
default = "last_15m"
|
||||
}
|
||||
|
||||
variable "eviction_threshold_warning" {
|
||||
description = "Elasticache free memory warning threshold in percentage"
|
||||
type = "string"
|
||||
default = 0
|
||||
}
|
||||
|
||||
variable "eviction_threshold_critical" {
|
||||
description = "Elasticache free memory critical threshold in percentage"
|
||||
type = "string"
|
||||
default = 30
|
||||
}
|
||||
|
||||
variable "max_connection_silenced" {
|
||||
|
||||
@ -6,11 +6,16 @@ resource "datadog_monitor" "elasticache_eviction" {
|
||||
type = "metric alert"
|
||||
|
||||
query = <<EOF
|
||||
${var.eviction_time_aggregator}(${var.eviction_timeframe}): (
|
||||
sum(${var.eviction_timeframe}): (
|
||||
avg:aws.elasticache.evictions${module.filter-tags.query_alert} by {region,cacheclusterid}
|
||||
) > 0
|
||||
) > ${var.eviction_threshold_critical}
|
||||
EOF
|
||||
|
||||
thresholds {
|
||||
warning = "${var.eviction_threshold_warning}"
|
||||
critical = "${var.eviction_threshold_critical}"
|
||||
}
|
||||
|
||||
notify_no_data = false
|
||||
evaluation_delay = "${var.evaluation_delay}"
|
||||
renotify_interval = 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user