MON-459 fix extra tags for service bus monitors

This commit is contained in:
Quentin Manfroi 2019-06-27 12:39:48 +02:00
parent 324bc46300
commit 133021c5a7
3 changed files with 29 additions and 11 deletions

View File

@ -70,25 +70,31 @@ variable "status_timeframe" {
}
variable "no_active_connections_enabled" {
description = "Flag to enable Service Bus status monitor"
description = "Flag to enable Service Bus no active connections monitor"
type = string
default = "true"
}
variable "no_active_connections_extra_tags" {
description = "Extra tags for Service Bus no active connections monitor"
type = list(string)
default = []
}
variable "no_active_connections_message" {
description = "Custom message for Service Bus status monitor"
description = "Custom message for Service Bus no active connections monitor"
type = string
default = ""
}
variable "no_active_connections_time_aggregator" {
description = "Monitor aggregator for Service Bus status [available values: min, max or avg]"
description = "Monitor aggregator for Service Bus no active connections [available values: min, max or avg]"
type = string
default = "max"
}
variable "no_active_connections_timeframe" {
description = "Monitor timeframe for Service Bus status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
description = "Monitor timeframe for Service Bus no active connections [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
type = string
default = "last_5m"
}
@ -105,6 +111,12 @@ variable "server_errors_enabled" {
default = "true"
}
variable "server_errors_extra_tags" {
description = "Extra tags for Service Bus server errors monitor"
type = list(string)
default = []
}
variable "server_errors_time_aggregator" {
description = "Monitor aggregator for Service Bus server errors [available values: min, max or avg]"
type = string
@ -139,6 +151,12 @@ variable "user_errors_enabled" {
default = "true"
}
variable "user_errors_extra_tags" {
description = "Extra tags for Service Bus user errors monitor"
type = list(string)
default = []
}
variable "user_errors_time_aggregator" {
description = "Monitor aggregator for Service Bus user errors [available values: min, max or avg]"
type = string

View File

@ -45,7 +45,7 @@ include_tags = true
locked = false
require_full_window = false
tags = concat(["env:${var.environment}", "resource:servicebus", "team:azure", "provider:azure"]
tags = concat(["env:${var.environment}", "resource:servicebus", "team:azure", "provider:azure"], var.no_active_connections_extra_tags)
}
resource "datadog_monitor" "service_bus_user_errors" {
@ -76,7 +76,7 @@ include_tags = true
locked = false
require_full_window = false
tags = concat(["env:${var.environment}", "resource:servicebus", "team:azure", "provider:azure"]
tags = concat(["env:${var.environment}", "resource:servicebus", "team:azure", "provider:azure"], var.user_errors_extra_tags)
}
resource "datadog_monitor" "service_bus_server_errors" {
@ -107,6 +107,6 @@ EOQ
locked = false
require_full_window = false
tags = concat(["env:${var.environment}", "resource:servicebus", "team:azure", "provider:azure"]
tags = concat(["env:${var.environment}", "resource:servicebus", "team:azure", "provider:azure"], var.server_errors_extra_tags)
}

View File

@ -25,8 +25,8 @@ EOQ
timeout_h = 0
include_tags = true
require_full_window = false
notify_no_data = false
renotify_interval = 0
notify_no_data = false
renotify_interval = 0
tags = concat(["env:${var.environment}", "type:cloud", "provider:gcp", "resource:cloud-sql", "team:claranet", "created-by:terraform"], var.cpu_utilization_extra_tags)
}
@ -138,8 +138,8 @@ EOQ
timeout_h = 0
include_tags = true
require_full_window = false
notify_no_data = false
renotify_interval = 0
notify_no_data = false
renotify_interval = 0
tags = concat(["env:${var.environment}", "type:cloud", "provider:gcp", "resource:cloud-sql", "team:claranet", "created-by:terraform"], var.memory_utilization_extra_tags)
}