MON-79 add monitor tags

This commit is contained in:
Quentin Manfroi 2017-11-03 13:00:43 +01:00
parent 681ada337d
commit 9470ad3166
2 changed files with 21 additions and 9 deletions

View File

@ -8,6 +8,18 @@ variable "environment" {
type = "string" type = "string"
} }
variable "provider" {
description = "Cloud provider which the monitor and its based metric depend on"
type = "string"
default = "azure"
}
variable "service" {
description = "Service monitored by this set of monitors"
type = "string"
default = "storage"
}
# Global DataDog # Global DataDog
variable "message" { variable "message" {
description = "Message sent when a Redis monitor is triggered" description = "Message sent when a Redis monitor is triggered"

View File

@ -32,7 +32,7 @@ EOF
renotify_interval = 0 renotify_interval = 0
no_data_timeframe = 20 no_data_timeframe = 20
tags = ["env:${var.environment}"] tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
} }
resource "datadog_monitor" "successful_requests" { resource "datadog_monitor" "successful_requests" {
@ -61,7 +61,7 @@ EOF
renotify_interval = 0 renotify_interval = 0
no_data_timeframe = 20 no_data_timeframe = 20
tags = ["env:${var.environment}"] tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
} }
resource "datadog_monitor" "latency" { resource "datadog_monitor" "latency" {
@ -90,7 +90,7 @@ EOF
renotify_interval = 0 renotify_interval = 0
no_data_timeframe = 20 no_data_timeframe = 20
tags = ["env:${var.environment}"] tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
} }
resource "datadog_monitor" "timeout_error_requests" { resource "datadog_monitor" "timeout_error_requests" {
@ -119,7 +119,7 @@ EOF
renotify_interval = 0 renotify_interval = 0
no_data_timeframe = 20 no_data_timeframe = 20
tags = ["env:${var.environment}"] tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
} }
@ -149,7 +149,7 @@ EOF
renotify_interval = 0 renotify_interval = 0
no_data_timeframe = 20 no_data_timeframe = 20
tags = ["env:${var.environment}"] tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
} }
@ -179,7 +179,7 @@ EOF
renotify_interval = 0 renotify_interval = 0
no_data_timeframe = 20 no_data_timeframe = 20
tags = ["env:${var.environment}"] tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
} }
@ -209,7 +209,7 @@ EOF
renotify_interval = 0 renotify_interval = 0
no_data_timeframe = 20 no_data_timeframe = 20
tags = ["env:${var.environment}"] tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
} }
@ -239,7 +239,7 @@ EOF
renotify_interval = 0 renotify_interval = 0
no_data_timeframe = 20 no_data_timeframe = 20
tags = ["env:${var.environment}"] tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
} }
@ -269,5 +269,5 @@ EOF
renotify_interval = 0 renotify_interval = 0
no_data_timeframe = 20 no_data_timeframe = 20
tags = ["env:${var.environment}"] tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"]
} }