MON-32 update tag convention and add extra tags
This commit is contained in:
parent
84af5591b9
commit
22d1cbc4ae
@ -35,6 +35,12 @@ variable "eviction_silenced" {
|
||||
type = "map"
|
||||
}
|
||||
|
||||
variable "eviction_extra_tags" {
|
||||
description = "Extra tags for Elasticache eviction monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "eviction_message" {
|
||||
description = "Custom message for Elasticache eviction monitor"
|
||||
type = "string"
|
||||
@ -54,6 +60,12 @@ variable "max_connection_silenced" {
|
||||
type = "map"
|
||||
}
|
||||
|
||||
variable "max_connection_extra_tags" {
|
||||
description = "Extra tags for Elasticache max connection monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "max_connection_message" {
|
||||
description = "Custom message for Elasticache max connection monitor"
|
||||
type = "string"
|
||||
@ -73,6 +85,12 @@ variable "no_connection_silenced" {
|
||||
type = "map"
|
||||
}
|
||||
|
||||
variable "no_connection_extra_tags" {
|
||||
description = "Extra tags for Elasticache no connection monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "no_connection_message" {
|
||||
description = "Custom message for Elasticache no connection monitor"
|
||||
type = "string"
|
||||
@ -92,6 +110,12 @@ variable "swap_silenced" {
|
||||
type = "map"
|
||||
}
|
||||
|
||||
variable "swap_extra_tags" {
|
||||
description = "Extra tags for Elasticache swap monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "swap_message" {
|
||||
description = "Custom message for Elasticache swap monitor"
|
||||
type = "string"
|
||||
@ -119,6 +143,12 @@ variable "free_memory_silenced" {
|
||||
type = "map"
|
||||
}
|
||||
|
||||
variable "free_memory_extra_tags" {
|
||||
description = "Extra tags for Elasticache free memory monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "free_memory_message" {
|
||||
description = "Custom message for Elasticache free memory monitor"
|
||||
type = "string"
|
||||
@ -145,6 +175,12 @@ variable "eviction_growing_silenced" {
|
||||
type = "map"
|
||||
}
|
||||
|
||||
variable "eviction_growing_extra_tags" {
|
||||
description = "Extra tags for Elasticache eviction growing monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "eviction_growing_message" {
|
||||
description = "Custom message for Elasticache eviction growing monitor"
|
||||
type = "string"
|
||||
|
||||
@ -22,7 +22,7 @@ resource "datadog_monitor" "elasticache_eviction" {
|
||||
|
||||
silenced = "${var.eviction_silenced}"
|
||||
|
||||
tags = ["env:${var.environment}", "engine:${var.resource}", "team:aws", "provider:aws"]
|
||||
tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache", "team:claranet", "created-by:terraform", "${var.eviction_extra_tags}"]
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "elasticache_max_connection" {
|
||||
@ -49,7 +49,7 @@ resource "datadog_monitor" "elasticache_max_connection" {
|
||||
|
||||
silenced = "${var.max_connection_silenced}"
|
||||
|
||||
tags = ["env:${var.environment}", "engine:${var.resource}", "team:aws", "provider:aws"]
|
||||
tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache", "team:claranet", "created-by:terraform", "${var.max_connection_extra_tags}"]
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "elasticache_no_connection" {
|
||||
@ -76,7 +76,7 @@ resource "datadog_monitor" "elasticache_no_connection" {
|
||||
|
||||
silenced = "${var.no_connection_silenced}"
|
||||
|
||||
tags = ["env:${var.environment}", "engine:${var.resource}", "team:aws", "provider:aws"]
|
||||
tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache", "team:claranet", "created-by:terraform", "${var.no_connection_extra_tags}"]
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "elasticache_swap" {
|
||||
@ -108,7 +108,7 @@ resource "datadog_monitor" "elasticache_swap" {
|
||||
|
||||
silenced = "${var.swap_silenced}"
|
||||
|
||||
tags = ["env:${var.environment}", "engine:${var.resource}", "team:aws", "provider:aws"]
|
||||
tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache", "team:claranet", "created-by:terraform", "${var.swap_extra_tags}"]
|
||||
}
|
||||
|
||||
# POC - A approfondir
|
||||
@ -141,7 +141,7 @@ resource "datadog_monitor" "elasticache_free_memory" {
|
||||
|
||||
silenced = "${var.free_memory_silenced}"
|
||||
|
||||
tags = ["env:${var.environment}", "engine:${var.resource}", "team:aws", "provider:aws"]
|
||||
tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache", "team:claranet", "created-by:terraform", "${var.free_memory_extra_tags}"]
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "elasticache_eviction_growing" {
|
||||
@ -173,5 +173,5 @@ resource "datadog_monitor" "elasticache_eviction_growing" {
|
||||
|
||||
silenced = "${var.eviction_growing_silenced}"
|
||||
|
||||
tags = ["env:${var.environment}", "engine:${var.resource}", "team:aws", "provider:aws"]
|
||||
tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache", "team:claranet", "created-by:terraform", "${var.eviction_growing_extra_tags}"]
|
||||
}
|
||||
|
||||
@ -36,6 +36,12 @@ variable "get_hits_silenced" {
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "get_hits_extra_tags" {
|
||||
description = "Extra tags for Elasticache memcached get hits monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "get_hits_message" {
|
||||
description = "Custom message for Elasticache memcached get hits monitor"
|
||||
type = "string"
|
||||
@ -63,6 +69,12 @@ variable "cpu_high_silenced" {
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "cpu_high_extra_tags" {
|
||||
description = "Extra tags for Elasticache memcached cpu high monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "cpu_high_message" {
|
||||
description = "Custom message for Elasticache memcached cpu high monitor"
|
||||
type = "string"
|
||||
|
||||
@ -84,7 +84,7 @@ resource "datadog_monitor" "memcached_get_hits" {
|
||||
|
||||
silenced = "${var.get_hits_silenced}"
|
||||
|
||||
tags = ["env:${var.environment}", "engine:memcached", "team:aws", "provider:aws"]
|
||||
tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache-memcached", "team:claranet", "created-by:terraform", "${var.get_hits_extra_tags}"]
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "memcached_cpu_high" {
|
||||
@ -116,5 +116,5 @@ resource "datadog_monitor" "memcached_cpu_high" {
|
||||
|
||||
silenced = "${var.cpu_high_silenced}"
|
||||
|
||||
tags = ["env:${var.environment}", "engine:memcached", "team:aws", "provider:aws"]
|
||||
tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache-memcached", "team:claranet", "created-by:terraform", "${var.cpu_high_extra_tags}"]
|
||||
}
|
||||
|
||||
@ -36,6 +36,12 @@ variable "cache_hits_silenced" {
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "cache_hits_extra_tags" {
|
||||
description = "Extra tags for Elasticache redis cache hits monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "cache_hits_message" {
|
||||
description = "Custom message for Elasticache redis cache hits monitor"
|
||||
type = "string"
|
||||
@ -63,6 +69,12 @@ variable "cpu_high_silenced" {
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "cpu_high_extra_tags" {
|
||||
description = "Extra tags for Elasticache redis cpu high monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "cpu_high_message" {
|
||||
description = "Custom message for Elasticache redis cpu high monitor"
|
||||
type = "string"
|
||||
@ -96,6 +108,12 @@ variable "replication_lag_silenced" {
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "replication_lag_extra_tags" {
|
||||
description = "Extra tags for Elasticache redis replication lag monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "replication_lag_message" {
|
||||
description = "Custom message for Elasticache redis replication lag monitor"
|
||||
type = "string"
|
||||
@ -129,6 +147,12 @@ variable "commands_silenced" {
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "commands_extra_tags" {
|
||||
description = "Extra tags for Elasticache redis commands monitor"
|
||||
type = "list"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "commands_message" {
|
||||
description = "Custom message for Elasticache redis commands monitor"
|
||||
type = "string"
|
||||
|
||||
@ -84,7 +84,7 @@ resource "datadog_monitor" "redis_cache_hits" {
|
||||
|
||||
silenced = "${var.cache_hits_silenced}"
|
||||
|
||||
tags = ["env:${var.environment}", "engine:redis", "team:aws", "provider:aws"]
|
||||
tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache-redis", "team:claranet", "created-by:terraform", "${var.cache_hits_extra_tags}"]
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "redis_cpu_high" {
|
||||
@ -111,7 +111,7 @@ resource "datadog_monitor" "redis_cpu_high" {
|
||||
|
||||
silenced = "${var.cpu_high_silenced}"
|
||||
|
||||
tags = ["env:${var.environment}", "engine:redis", "team:aws", "provider:aws"]
|
||||
tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache-redis", "team:claranet", "created-by:terraform", "${var.cpu_high_extra_tags}"]
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "redis_replication_lag" {
|
||||
@ -143,7 +143,7 @@ resource "datadog_monitor" "redis_replication_lag" {
|
||||
|
||||
silenced = "${var.replication_lag_silenced}"
|
||||
|
||||
tags = ["env:${var.environment}", "engine:redis", "team:aws", "provider:aws"]
|
||||
tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache-redis", "team:claranet", "created-by:terraform", "${var.replication_lag_extra_tags}"]
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "redis_commands" {
|
||||
@ -171,5 +171,5 @@ resource "datadog_monitor" "redis_commands" {
|
||||
|
||||
silenced = "${var.commands_silenced}"
|
||||
|
||||
tags = ["env:${var.environment}", "engine:redis", "team:aws", "provider:aws"]
|
||||
tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache-redis", "team:claranet", "created-by:terraform", "${var.commands_extra_tags}"]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user