From 9470ad31668879cb7fb7a97585badb8d403d8552 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Fri, 3 Nov 2017 13:00:43 +0100 Subject: [PATCH] MON-79 add monitor tags --- cloud/azure/storage/inputs.tf | 12 ++++++++++++ cloud/azure/storage/monitors-azure-storage.tf | 18 +++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/cloud/azure/storage/inputs.tf b/cloud/azure/storage/inputs.tf index 68e02a5..5f99615 100644 --- a/cloud/azure/storage/inputs.tf +++ b/cloud/azure/storage/inputs.tf @@ -8,6 +8,18 @@ variable "environment" { 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 variable "message" { description = "Message sent when a Redis monitor is triggered" diff --git a/cloud/azure/storage/monitors-azure-storage.tf b/cloud/azure/storage/monitors-azure-storage.tf index e2b115e..388706c 100644 --- a/cloud/azure/storage/monitors-azure-storage.tf +++ b/cloud/azure/storage/monitors-azure-storage.tf @@ -32,7 +32,7 @@ EOF renotify_interval = 0 no_data_timeframe = 20 - tags = ["env:${var.environment}"] + tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"] } resource "datadog_monitor" "successful_requests" { @@ -61,7 +61,7 @@ EOF renotify_interval = 0 no_data_timeframe = 20 - tags = ["env:${var.environment}"] + tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"] } resource "datadog_monitor" "latency" { @@ -90,7 +90,7 @@ EOF renotify_interval = 0 no_data_timeframe = 20 - tags = ["env:${var.environment}"] + tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"] } resource "datadog_monitor" "timeout_error_requests" { @@ -119,7 +119,7 @@ EOF renotify_interval = 0 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 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 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 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 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 no_data_timeframe = 20 - tags = ["env:${var.environment}"] + tags = ["env:${var.environment}","resource:${var.service}","team:${var.provider}"] }