MON-105 split delay variables

This commit is contained in:
Quentin Manfroi 2018-09-18 14:15:15 +02:00
parent abab6aa763
commit 2a64727e81
2 changed files with 10 additions and 5 deletions

View File

@ -4,11 +4,16 @@ variable "environment" {
}
# Global DataDog
variable "delay" {
variable "evaluation_delay" {
description = "Delay in seconds for the metric evaluation"
default = 15
}
variable "new_host_delay" {
description = "Delay in seconds for the metric evaluation"
default = 300
}
variable "message" {
description = "Message sent when an alert is triggered"
}

View File

@ -18,8 +18,8 @@ resource "datadog_monitor" "postgresql_connection_too_high" {
) * 100 > ${var.postgresql_connection_threshold_critical}
EOF
evaluation_delay = "${var.delay}"
new_host_delay = "${var.delay}"
evaluation_delay = "${var.evaluation_delay}"
new_host_delay = "${var.new_host_delay}"
thresholds {
warning = "${var.postgresql_connection_threshold_warning}"
@ -49,8 +49,8 @@ resource "datadog_monitor" "postgresql_too_many_locks" {
) > ${var.postgresql_lock_threshold_critical}
EOF
evaluation_delay = "${var.delay}"
new_host_delay = "${var.delay}"
evaluation_delay = "${var.evaluation_delay}"
new_host_delay = "${var.new_host_delay}"
thresholds {
warning = "${var.postgresql_lock_threshold_warning}"