MON-247 add extra tags and enabled feature
This commit is contained in:
parent
d8709927e1
commit
3ee6fcd2e7
@ -48,6 +48,18 @@ variable "ark_schedules_monitor_silenced" {
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "ark_schedules_enabled" {
|
||||
description = "Flag to enable Ark schedules monitor"
|
||||
type = "string"
|
||||
default = "true"
|
||||
}
|
||||
|
||||
variable "ark_schedules_extra_tags" {
|
||||
description = "Extra tags for Ark schedules monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "ark_schedules_monitor_no_data_timeframe" {
|
||||
description = "No data timeframe"
|
||||
default = 1440
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
resource "datadog_monitor" "ark_schedules_monitor" {
|
||||
count = "${var.ark_schedules_enabled ? 1 : 0}"
|
||||
name = "[${var.environment}] Ark backup failed on {{schedule.name}}"
|
||||
type = "metric alert"
|
||||
message = "${coalesce(var.ark_schedules_monitor_message, var.message)}"
|
||||
@ -25,5 +26,5 @@ resource "datadog_monitor" "ark_schedules_monitor" {
|
||||
require_full_window = false
|
||||
|
||||
silenced = "${var.ark_schedules_monitor_silenced}"
|
||||
tags = ["env:${var.environment}", "type:caas", "provider:prometheus", "resource:ark", "team:claranet", "created-by:terraform"]
|
||||
tags = ["env:${var.environment}", "type:caas", "provider:prometheus", "resource:ark", "team:claranet", "created-by:terraform", "${var.ark_schedules_extra_tags}"]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user