diff --git a/cloud/aws/alb/README.md b/cloud/aws/alb/README.md index cfee6da..4fb7c41 100644 --- a/cloud/aws/alb/README.md +++ b/cloud/aws/alb/README.md @@ -27,6 +27,7 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| alb_no_healthy_instances_extra_tags | Extra tags for ALB no healthy instances monitor | list | `` | no | | alb_no_healthy_instances_message | Custom message for ALB no healthy instances monitor | string | `` | no | | alb_no_healthy_instances_silenced | Groups to mute for ALB no healthy instances monitor | map | `` | no | | alb_no_healthy_instances_time_aggregator | Monitor aggregator for ALB no healthy instances [available values: min, max or avg] | string | `min` | no | @@ -36,26 +37,31 @@ Creates DataDog monitors with the following checks: | evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | +| httpcode_alb_4xx_extra_tags | Extra tags for ALB httpcode 4xx monitor | list | `` | no | | httpcode_alb_4xx_message | Custom message for ALB httpcode 4xx monitor | string | `` | no | | httpcode_alb_4xx_silenced | Groups to mute for ALB httpcode 4xx monitor | map | `` | no | | httpcode_alb_4xx_threshold_critical | loadbalancer 4xx critical threshold in percentage | string | `80` | no | | httpcode_alb_4xx_threshold_warning | loadbalancer 4xx warning threshold in percentage | string | `60` | no | | httpcode_alb_4xx_timeframe | Monitor timeframe for ALB httpcode 4xx [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| httpcode_alb_5xx_extra_tags | Extra tags for ALB httpcode 5xx monitor | list | `` | no | | httpcode_alb_5xx_message | Custom message for ALB httpcode 5xx monitor | string | `` | no | | httpcode_alb_5xx_silenced | Groups to mute for ALB httpcode 5xx monitor | map | `` | no | | httpcode_alb_5xx_threshold_critical | loadbalancer 5xx critical threshold in percentage | string | `80` | no | | httpcode_alb_5xx_threshold_warning | loadbalancer 5xx warning threshold in percentage | string | `60` | no | | httpcode_alb_5xx_timeframe | Monitor timeframe for ALB httpcode 5xx [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| httpcode_target_4xx_extra_tags | Extra tags for ALB target httpcode 4xx monitor | list | `` | no | | httpcode_target_4xx_message | Custom message for ALB target httpcode 4xx monitor | string | `` | no | | httpcode_target_4xx_silenced | Groups to mute for ALB target httpcode 4xx monitor | map | `` | no | | httpcode_target_4xx_threshold_critical | target 4xx critical threshold in percentage | string | `80` | no | | httpcode_target_4xx_threshold_warning | target 4xx warning threshold in percentage | string | `60` | no | | httpcode_target_4xx_timeframe | Monitor timeframe for ALB target httpcode 4xx [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| httpcode_target_5xx_extra_tags | Extra tags for ALB target httpcode 5xx monitor | list | `` | no | | httpcode_target_5xx_message | Custom message for ALB target httpcode 5xx monitor | string | `` | no | | httpcode_target_5xx_silenced | Groups to mute for ALB target httpcode 5xx monitor | map | `` | no | | httpcode_target_5xx_threshold_critical | target 5xx critical threshold in percentage | string | `80` | no | | httpcode_target_5xx_threshold_warning | target 5xx warning threshold in percentage | string | `60` | no | | httpcode_target_5xx_timeframe | Monitor timeframe for ALB target httpcode 5xx [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| latency_extra_tags | Extra tags for ALB latency monitor | list | `` | no | | latency_message | Custom message for ALB latency monitor | string | `` | no | | latency_silenced | Groups to mute for ALB latency monitor | map | `` | no | | latency_threshold_critical | latency critical threshold in milliseconds | string | `1000` | no | diff --git a/cloud/aws/alb/inputs.tf b/cloud/aws/alb/inputs.tf index 5c8a964..8dc3808 100644 --- a/cloud/aws/alb/inputs.tf +++ b/cloud/aws/alb/inputs.tf @@ -37,6 +37,12 @@ variable "alb_no_healthy_instances_silenced" { default = {} } +variable "alb_no_healthy_instances_extra_tags" { + description = "Extra tags for ALB no healthy instances monitor" + type = "list" + default = [] +} + variable "alb_no_healthy_instances_message" { description = "Custom message for ALB no healthy instances monitor" type = "string" @@ -61,6 +67,12 @@ variable "latency_silenced" { default = {} } +variable "latency_extra_tags" { + description = "Extra tags for ALB latency monitor" + type = "list" + default = [] +} + variable "latency_message" { description = "Custom message for ALB latency monitor" type = "string" @@ -95,6 +107,12 @@ variable "httpcode_alb_4xx_silenced" { default = {} } +variable "httpcode_alb_4xx_extra_tags" { + description = "Extra tags for ALB httpcode 4xx monitor" + type = "list" + default = [] +} + variable "httpcode_alb_4xx_message" { description = "Custom message for ALB httpcode 4xx monitor" type = "string" @@ -123,6 +141,12 @@ variable "httpcode_target_4xx_silenced" { default = {} } +variable "httpcode_target_4xx_extra_tags" { + description = "Extra tags for ALB target httpcode 4xx monitor" + type = "list" + default = [] +} + variable "httpcode_target_4xx_message" { description = "Custom message for ALB target httpcode 4xx monitor" type = "string" @@ -151,6 +175,12 @@ variable "httpcode_alb_5xx_silenced" { default = {} } +variable "httpcode_alb_5xx_extra_tags" { + description = "Extra tags for ALB httpcode 5xx monitor" + type = "list" + default = [] +} + variable "httpcode_alb_5xx_message" { description = "Custom message for ALB httpcode 5xx monitor" type = "string" @@ -179,6 +209,12 @@ variable "httpcode_target_5xx_silenced" { default = {} } +variable "httpcode_target_5xx_extra_tags" { + description = "Extra tags for ALB target httpcode 5xx monitor" + type = "list" + default = [] +} + variable "httpcode_target_5xx_message" { description = "Custom message for ALB target httpcode 5xx monitor" type = "string" diff --git a/cloud/aws/alb/monitors-alb.tf b/cloud/aws/alb/monitors-alb.tf index dc3f77a..cb4b232 100644 --- a/cloud/aws/alb/monitors-alb.tf +++ b/cloud/aws/alb/monitors-alb.tf @@ -24,7 +24,7 @@ resource "datadog_monitor" "ALB_no_healthy_instances" { silenced = "${var.alb_no_healthy_instances_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:alb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:alb", "team:claranet", "created-by:terraform", "${var.alb_no_healthy_instances_extra_tags}"] } resource "datadog_monitor" "ALB_latency" { @@ -54,7 +54,7 @@ resource "datadog_monitor" "ALB_latency" { silenced = "${var.latency_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:alb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:alb", "team:claranet", "created-by:terraform", "${var.latency_extra_tags}"] } resource "datadog_monitor" "ALB_httpcode_5xx" { @@ -87,7 +87,7 @@ resource "datadog_monitor" "ALB_httpcode_5xx" { silenced = "${var.httpcode_alb_5xx_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:alb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:alb", "team:claranet", "created-by:terraform", "${var.httpcode_alb_5xx_extra_tags}"] } resource "datadog_monitor" "ALB_httpcode_4xx" { @@ -120,7 +120,7 @@ resource "datadog_monitor" "ALB_httpcode_4xx" { silenced = "${var.httpcode_alb_4xx_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:alb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:alb", "team:claranet", "created-by:terraform", "${var.httpcode_alb_4xx_extra_tags}"] } resource "datadog_monitor" "ALB_httpcode_target_5xx" { @@ -153,7 +153,7 @@ resource "datadog_monitor" "ALB_httpcode_target_5xx" { silenced = "${var.httpcode_target_5xx_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:alb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:alb", "team:claranet", "created-by:terraform", "${var.httpcode_target_5xx_extra_tags}"] } resource "datadog_monitor" "ALB_httpcode_target_4xx" { @@ -186,5 +186,5 @@ resource "datadog_monitor" "ALB_httpcode_target_4xx" { silenced = "${var.httpcode_target_4xx_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:alb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:alb", "team:claranet", "created-by:terraform", "${var.httpcode_target_4xx_extra_tags}"] } diff --git a/cloud/aws/apigateway/README.md b/cloud/aws/apigateway/README.md index f21c281..81095ab 100644 --- a/cloud/aws/apigateway/README.md +++ b/cloud/aws/apigateway/README.md @@ -28,16 +28,19 @@ Creates DataDog monitors with the following checks: | environment | Environment | string | - | yes | | evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | | filter_tags | Tags used for filtering | string | `*` | no | +| http_4xx_requests_extra_tags | Extra tags for API Gateway HTTP 4xx requests monitor | list | `` | no | | http_4xx_requests_message | Custom message for API Gateway HTTP 4xx requests monitor | string | `` | no | | http_4xx_requests_silenced | Groups to mute for API Gateway HTTP 4xx requests monitor | map | `` | no | | http_4xx_requests_threshold_critical | Maximum critical acceptable percent of 4xx errors | string | `30` | no | | http_4xx_requests_threshold_warning | Maximum warning acceptable percent of 4xx errors | string | `15` | no | | http_4xx_requests_timeframe | Monitor timeframe for API HTTP 4xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| http_5xx_requests_extra_tags | Extra tags for API Gateway HTTP 5xx requests monitor | list | `` | no | | http_5xx_requests_message | Custom message for API Gateway HTTP 5xx requests monitor | string | `` | no | | http_5xx_requests_silenced | Groups to mute for API Gateway HTTP 5xx requests monitor | map | `` | no | | http_5xx_requests_threshold_critical | Maximum critical acceptable percent of 5xx errors | string | `20` | no | | http_5xx_requests_threshold_warning | Maximum warning acceptable percent of 5xx errors | string | `10` | no | | http_5xx_requests_timeframe | Monitor timeframe for API HTTP 5xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| latency_extra_tags | Extra tags for API Gateway latency monitor | list | `` | no | | latency_message | Custom message for API Gateway latency monitor | string | `` | no | | latency_silenced | Groups to mute for API Gateway latency monitor | map | `` | no | | latency_threshold_critical | Alerting threshold in milliseconds | string | `800` | no | diff --git a/cloud/aws/apigateway/inputs.tf b/cloud/aws/apigateway/inputs.tf index 917490c..5fb3744 100644 --- a/cloud/aws/apigateway/inputs.tf +++ b/cloud/aws/apigateway/inputs.tf @@ -32,6 +32,12 @@ variable "latency_silenced" { default = {} } +variable "latency_extra_tags" { + description = "Extra tags for API Gateway latency monitor" + type = "list" + default = [] +} + variable "latency_message" { description = "Custom message for API Gateway latency monitor" type = "string" @@ -70,6 +76,12 @@ variable "http_5xx_requests_silenced" { default = {} } +variable "http_5xx_requests_extra_tags" { + description = "Extra tags for API Gateway HTTP 5xx requests monitor" + type = "list" + default = [] +} + variable "http_5xx_requests_message" { description = "Custom message for API Gateway HTTP 5xx requests monitor" type = "string" @@ -102,6 +114,12 @@ variable "http_4xx_requests_silenced" { default = {} } +variable "http_4xx_requests_extra_tags" { + description = "Extra tags for API Gateway HTTP 4xx requests monitor" + type = "list" + default = [] +} + variable "http_4xx_requests_message" { description = "Custom message for API Gateway HTTP 4xx requests monitor" type = "string" diff --git a/cloud/aws/apigateway/monitors-api.tf b/cloud/aws/apigateway/monitors-api.tf index 4c740ec..81ea5c3 100644 --- a/cloud/aws/apigateway/monitors-api.tf +++ b/cloud/aws/apigateway/monitors-api.tf @@ -26,7 +26,7 @@ resource "datadog_monitor" "API_Gateway_latency" { silenced = "${var.latency_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:apigateway", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:apigateway", "team:claranet", "created-by:terraform", "${var.latency_extra_tags}"] } # Monitoring API Gateway 5xx errors percent @@ -60,7 +60,7 @@ resource "datadog_monitor" "API_http_5xx_errors_count" { silenced = "${var.http_5xx_requests_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:apigateway", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:apigateway", "team:claranet", "created-by:terraform", "${var.http_5xx_requests_extra_tags}"] } # Monitoring API Gateway 4xx errors percent @@ -94,5 +94,5 @@ resource "datadog_monitor" "API_http_4xx_errors_count" { silenced = "${var.http_4xx_requests_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:apigateway", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:apigateway", "team:claranet", "created-by:terraform", "${var.http_4xx_requests_extra_tags}"] } diff --git a/cloud/aws/elasticsearch/README.md b/cloud/aws/elasticsearch/README.md index 91dfd71..3aa516e 100644 --- a/cloud/aws/elasticsearch/README.md +++ b/cloud/aws/elasticsearch/README.md @@ -24,12 +24,14 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| cpu_extra_tags | Extra tags for ES cluster cpu monitor | list | `` | no | | cpu_message | Custom message for ES cluster cpu monitor | string | `` | no | | cpu_silenced | Groups to mute for ES cluster cpu monitor | map | `` | no | | cpu_threshold_critical | CPU usage in percent (critical threshold) | string | `90` | no | | cpu_threshold_warning | CPU usage in percent (warning threshold) | string | `80` | no | | cpu_time_aggregator | Monitor aggregator for ES cluster cpu [available values: min, max or avg] | string | `min` | no | | cpu_timeframe | Monitor timeframe for ES cluster cpu [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | +| diskspace_extra_tags | Extra tags for ES cluster diskspace monitor | list | `` | no | | diskspace_message | Custom message for ES cluster diskspace monitor | string | `` | no | | diskspace_silenced | Groups to mute for ES cluster diskspace monitor | map | `` | no | | diskspace_threshold_critical | Disk free space in percent (critical threshold) | string | `10` | no | @@ -37,6 +39,7 @@ Creates DataDog monitors with the following checks: | diskspace_time_aggregator | Monitor aggregator for ES cluster diskspace [available values: min, max or avg] | string | `max` | no | | diskspace_timeframe | Monitor timeframe for ES cluster diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | | environment | Architecture Environment | string | - | yes | +| es_cluster_status_extra_tags | Extra tags for ES cluster status monitor | list | `` | no | | es_cluster_status_message | Custom message for ES cluster status monitor | string | `` | no | | es_cluster_status_silenced | Groups to mute for ES cluster status monitor | map | `` | no | | es_cluster_status_timeframe | Monitor timeframe for ES cluster status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_30m` | no | diff --git a/cloud/aws/elasticsearch/inputs.tf b/cloud/aws/elasticsearch/inputs.tf index 822ad14..29c0974 100644 --- a/cloud/aws/elasticsearch/inputs.tf +++ b/cloud/aws/elasticsearch/inputs.tf @@ -37,6 +37,12 @@ variable "es_cluster_status_silenced" { default = {} } +variable "es_cluster_status_extra_tags" { + description = "Extra tags for ES cluster status monitor" + type = "list" + default = [] +} + variable "es_cluster_status_message" { description = "Custom message for ES cluster status monitor" type = "string" @@ -59,6 +65,12 @@ variable "diskspace_silenced" { default = {} } +variable "diskspace_extra_tags" { + description = "Extra tags for ES cluster diskspace monitor" + type = "list" + default = [] +} + variable "diskspace_message" { description = "Custom message for ES cluster diskspace monitor" type = "string" @@ -93,6 +105,12 @@ variable "cpu_silenced" { default = {} } +variable "cpu_extra_tags" { + description = "Extra tags for ES cluster cpu monitor" + type = "list" + default = [] +} + variable "cpu_message" { description = "Custom message for ES cluster cpu monitor" type = "string" diff --git a/cloud/aws/elasticsearch/monitors-elasticsearch.tf b/cloud/aws/elasticsearch/monitors-elasticsearch.tf index d923285..c718d84 100644 --- a/cloud/aws/elasticsearch/monitors-elasticsearch.tf +++ b/cloud/aws/elasticsearch/monitors-elasticsearch.tf @@ -33,7 +33,7 @@ EOF silenced = "${var.es_cluster_status_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticsearch", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticsearch", "team:claranet", "created-by:terraform", "${var.es_cluster_status_extra_tags}"] } ### Elasticsearch cluster free storage space monitor ### @@ -67,7 +67,7 @@ EOF silenced = "${var.diskspace_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticsearch", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticsearch", "team:claranet", "created-by:terraform", "${var.diskspace_extra_tags}"] } ### Elasticsearch cluster CPU monitor ### @@ -100,5 +100,5 @@ EOF silenced = "${var.cpu_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticsearch", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticsearch", "team:claranet", "created-by:terraform", "${var.cpu_extra_tags}"] } diff --git a/cloud/aws/elb/README.md b/cloud/aws/elb/README.md index 883ea99..1e843f8 100644 --- a/cloud/aws/elb/README.md +++ b/cloud/aws/elb/README.md @@ -28,32 +28,38 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| | artificial_requests_count | Number of false requests used to mitigate false positive in case of low trafic | string | `5` | no | +| elb_4xx_extra_tags | Extra tags for ELB 4xx errors monitor | list | `` | no | | elb_4xx_message | Custom message for ELB 4xx errors monitor | string | `` | no | | elb_4xx_silenced | Groups to mute for ELB 4xx errors monitor | map | `` | no | | elb_4xx_threshold_critical | loadbalancer 4xx critical threshold in percentage | string | `10` | no | | elb_4xx_threshold_warning | loadbalancer 4xx warning threshold in percentage | string | `5` | no | | elb_4xx_timeframe | Monitor timeframe for ELB 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| elb_5xx_extra_tags | Extra tags for ELB 5xx errors monitor | list | `` | no | | elb_5xx_message | Custom message for ELB 5xx errors monitor | string | `` | no | | elb_5xx_silenced | Groups to mute for ELB 5xx errors monitor | map | `` | no | | elb_5xx_threshold_critical | loadbalancer 5xx critical threshold in percentage | string | `10` | no | | elb_5xx_threshold_warning | loadbalancer 5xx warning threshold in percentage | string | `5` | no | | elb_5xx_timeframe | Monitor timeframe for ELB 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| elb_backend_4xx_extra_tags | Extra tags for ELB backend 4xx errors monitor | list | `` | no | | elb_backend_4xx_message | Custom message for ELB backend 4xx errors monitor | string | `` | no | | elb_backend_4xx_silenced | Groups to mute for ELB backend 4xx errors monitor | map | `` | no | | elb_backend_4xx_threshold_critical | loadbalancer backend 4xx critical threshold in percentage | string | `10` | no | | elb_backend_4xx_threshold_warning | loadbalancer backend 4xx warning threshold in percentage | string | `5` | no | | elb_backend_4xx_timeframe | Monitor timeframe for ELB backend 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| elb_backend_5xx_extra_tags | Extra tags for ELB backend 5xx errors monitor | list | `` | no | | elb_backend_5xx_message | Custom message for ELB backend 5xx errors monitor | string | `` | no | | elb_backend_5xx_silenced | Groups to mute for ELB backend 5xx errors monitor | map | `` | no | | elb_backend_5xx_threshold_critical | loadbalancer backend 5xx critical threshold in percentage | string | `10` | no | | elb_backend_5xx_threshold_warning | loadbalancer backend 5xx warning threshold in percentage | string | `5` | no | | elb_backend_5xx_timeframe | Monitor timeframe for ELB backend 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | elb_backend_latency_critical | latency critical threshold in seconds | string | `5` | no | +| elb_backend_latency_extra_tags | Extra tags for ELB backend latency monitor | list | `` | no | | elb_backend_latency_message | Custom message for ELB backend latency monitor | string | `` | no | | elb_backend_latency_silenced | Groups to mute for ELB backend latency monitor | map | `` | no | | elb_backend_latency_time_aggregator | Monitor aggregator for ELB backend latency [available values: min, max or avg] | string | `min` | no | | elb_backend_latency_timeframe | Monitor timeframe for ELB backend latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | elb_backend_latency_warning | latency warning threshold in seconds | string | `1` | no | +| elb_no_healthy_instance_extra_tags | Extra tags for ELB no healty instance monitor | list | `` | no | | elb_no_healthy_instance_message | Custom message for ELB no healty instance monitor | string | `` | no | | elb_no_healthy_instance_silenced | Groups to mute for ELB no healty instance monitor | map | `` | no | | elb_no_healthy_instance_time_aggregator | Monitor aggregator for ELB no healty instance [available values: min or max] | string | `min` | no | diff --git a/cloud/aws/elb/inputs.tf b/cloud/aws/elb/inputs.tf index fa13136..7654cbc 100644 --- a/cloud/aws/elb/inputs.tf +++ b/cloud/aws/elb/inputs.tf @@ -36,6 +36,12 @@ variable "elb_no_healthy_instance_silenced" { default = {} } +variable "elb_no_healthy_instance_extra_tags" { + description = "Extra tags for ELB no healty instance monitor" + type = "list" + default = [] +} + variable "elb_no_healthy_instance_message" { description = "Custom message for ELB no healty instance monitor" type = "string" @@ -60,6 +66,12 @@ variable "elb_4xx_silenced" { default = {} } +variable "elb_4xx_extra_tags" { + description = "Extra tags for ELB 4xx errors monitor" + type = "list" + default = [] +} + variable "elb_4xx_message" { description = "Custom message for ELB 4xx errors monitor" type = "string" @@ -88,6 +100,12 @@ variable "elb_5xx_silenced" { default = {} } +variable "elb_5xx_extra_tags" { + description = "Extra tags for ELB 5xx errors monitor" + type = "list" + default = [] +} + variable "elb_5xx_message" { description = "Custom message for ELB 5xx errors monitor" type = "string" @@ -116,6 +134,12 @@ variable "elb_backend_4xx_silenced" { default = {} } +variable "elb_backend_4xx_extra_tags" { + description = "Extra tags for ELB backend 4xx errors monitor" + type = "list" + default = [] +} + variable "elb_backend_4xx_message" { description = "Custom message for ELB backend 4xx errors monitor" type = "string" @@ -144,6 +168,12 @@ variable "elb_backend_5xx_silenced" { default = {} } +variable "elb_backend_5xx_extra_tags" { + description = "Extra tags for ELB backend 5xx errors monitor" + type = "list" + default = [] +} + variable "elb_backend_5xx_message" { description = "Custom message for ELB backend 5xx errors monitor" type = "string" @@ -172,6 +202,12 @@ variable "elb_backend_latency_silenced" { default = {} } +variable "elb_backend_latency_extra_tags" { + description = "Extra tags for ELB backend latency monitor" + type = "list" + default = [] +} + variable "elb_backend_latency_message" { description = "Custom message for ELB backend latency monitor" type = "string" diff --git a/cloud/aws/elb/monitors-elb.tf b/cloud/aws/elb/monitors-elb.tf index d2400c8..61b44c7 100644 --- a/cloud/aws/elb/monitors-elb.tf +++ b/cloud/aws/elb/monitors-elb.tf @@ -22,7 +22,7 @@ resource "datadog_monitor" "ELB_no_healthy_instances" { silenced = "${var.elb_no_healthy_instance_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform", "${var.elb_no_healthy_instance_extra_tags}"] } resource "datadog_monitor" "ELB_too_much_4xx" { @@ -57,7 +57,7 @@ resource "datadog_monitor" "ELB_too_much_4xx" { silenced = "${var.elb_4xx_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform", "${var.elb_4xx_extra_tags}"] } resource "datadog_monitor" "ELB_too_much_5xx" { @@ -92,7 +92,7 @@ resource "datadog_monitor" "ELB_too_much_5xx" { silenced = "${var.elb_5xx_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform", "${var.elb_5xx_extra_tags}"] } resource "datadog_monitor" "ELB_too_much_4xx_backend" { @@ -127,7 +127,7 @@ resource "datadog_monitor" "ELB_too_much_4xx_backend" { silenced = "${var.elb_backend_4xx_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform", "${var.elb_backend_4xx_extra_tags}"] } resource "datadog_monitor" "ELB_too_much_5xx_backend" { @@ -162,7 +162,7 @@ resource "datadog_monitor" "ELB_too_much_5xx_backend" { silenced = "${var.elb_backend_5xx_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform", "${var.elb_backend_5xx_extra_tags}"] } resource "datadog_monitor" "ELB_backend_latency" { @@ -194,5 +194,5 @@ resource "datadog_monitor" "ELB_backend_latency" { silenced = "${var.elb_backend_latency_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform", "${var.elb_backend_latency_extra_tags}"] } diff --git a/cloud/aws/kinesis-firehose/README.md b/cloud/aws/kinesis-firehose/README.md index 84b9c70..5c0d8e1 100644 --- a/cloud/aws/kinesis-firehose/README.md +++ b/cloud/aws/kinesis-firehose/README.md @@ -26,6 +26,7 @@ Creates DataDog monitors with the following checks: | evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | +| incoming_records_extra_tags | Extra tags for Kinesis Firehorse incoming records monitor | list | `` | no | | incoming_records_message | Custom message for Kinesis Firehorse incoming records monitor | string | `` | no | | incoming_records_silenced | Groups to mute for Kinesis Firehorse incoming records monitor | map | `` | no | | incoming_records_timeframe | Monitor timeframe for incoming records metrics evaluation [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | diff --git a/cloud/aws/kinesis-firehose/inputs.tf b/cloud/aws/kinesis-firehose/inputs.tf index 95e7a06..b229e6b 100644 --- a/cloud/aws/kinesis-firehose/inputs.tf +++ b/cloud/aws/kinesis-firehose/inputs.tf @@ -37,6 +37,12 @@ variable "incoming_records_silenced" { default = {} } +variable "incoming_records_extra_tags" { + description = "Extra tags for Kinesis Firehorse incoming records monitor" + type = "list" + default = [] +} + variable "incoming_records_message" { description = "Custom message for Kinesis Firehorse incoming records monitor" type = "string" diff --git a/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf b/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf index 3592fe1..6d0f428 100644 --- a/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf +++ b/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf @@ -27,5 +27,5 @@ resource "datadog_monitor" "firehose_incoming_records" { silenced = "${var.incoming_records_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:kinesis-firehose", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:kinesis-firehose", "team:claranet", "created-by:terraform", "${var.incoming_records_extra_tags}"] } diff --git a/cloud/aws/rds/README.md b/cloud/aws/rds/README.md index 28e0d2e..d4941ab 100644 --- a/cloud/aws/rds/README.md +++ b/cloud/aws/rds/README.md @@ -23,12 +23,14 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| cpu_extra_tags | Extra tags for RDS CPU usage monitor | list | `` | no | | cpu_message | Custom message for RDS CPU usage monitor | string | `` | no | | cpu_silenced | Groups to mute for RDS CPU usage monitor | map | `` | no | | cpu_threshold_critical | CPU usage in percent (critical threshold) | string | `90` | no | | cpu_threshold_warning | CPU usage in percent (warning threshold) | string | `80` | no | | cpu_time_aggregator | Monitor aggregator for RDS CPU usage [available values: min, max or avg] | string | `min` | no | | cpu_timeframe | Monitor timeframe for RDS CPU usage [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | +| diskspace_extra_tags | Extra tags for RDS free diskspace monitor | list | `` | no | | diskspace_message | Custom message for RDS free diskspace monitor | string | `` | no | | diskspace_silenced | Groups to mute for RDS free diskspace monitor | map | `` | no | | diskspace_threshold_critical | Disk free space in percent (critical threshold) | string | `10` | no | diff --git a/cloud/aws/rds/inputs.tf b/cloud/aws/rds/inputs.tf index a179a49..4c8d05b 100644 --- a/cloud/aws/rds/inputs.tf +++ b/cloud/aws/rds/inputs.tf @@ -37,6 +37,12 @@ variable "cpu_silenced" { default = {} } +variable "cpu_extra_tags" { + description = "Extra tags for RDS CPU usage monitor" + type = "list" + default = [] +} + variable "cpu_message" { description = "Custom message for RDS CPU usage monitor" type = "string" @@ -71,6 +77,12 @@ variable "diskspace_silenced" { default = {} } +variable "diskspace_extra_tags" { + description = "Extra tags for RDS free diskspace monitor" + type = "list" + default = [] +} + variable "diskspace_message" { description = "Custom message for RDS free diskspace monitor" type = "string" diff --git a/cloud/aws/rds/monitors-rds.tf b/cloud/aws/rds/monitors-rds.tf index 1d2caea..9563a0a 100644 --- a/cloud/aws/rds/monitors-rds.tf +++ b/cloud/aws/rds/monitors-rds.tf @@ -27,7 +27,7 @@ EOF silenced = "${var.cpu_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:rds", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:rds", "team:claranet", "created-by:terraform", "${var.cpu_extra_tags}"] } ### RDS instance free space monitor ### @@ -60,5 +60,5 @@ EOF silenced = "${var.diskspace_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:rds", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:rds", "team:claranet", "created-by:terraform", "${var.diskspace_extra_tags}"] } diff --git a/cloud/aws/vpn/README.md b/cloud/aws/vpn/README.md index 355c77e..c1c8aeb 100644 --- a/cloud/aws/vpn/README.md +++ b/cloud/aws/vpn/README.md @@ -27,6 +27,7 @@ Creates DataDog monitors with the following checks: | filter_tags | Tags used for metrics filtering | string | `*` | no | | message | Message sent when an alert is triggered | string | - | yes | | new_host_delay | Delay in seconds before monitor new resource | string | `300` | no | +| vpn_status_extra_tags | Extra tags for VPN status monitor | list | `` | no | | vpn_status_message | Custom message for VPN status monitor | string | `` | no | | vpn_status_silenced | Groups to mute for VPN status monitor | map | `` | no | | vpn_status_time_aggregator | Monitor aggregator for VPN status [available values: min, max or avg] | string | `max` | no | diff --git a/cloud/aws/vpn/inputs.tf b/cloud/aws/vpn/inputs.tf index 8afd124..6424ca3 100644 --- a/cloud/aws/vpn/inputs.tf +++ b/cloud/aws/vpn/inputs.tf @@ -30,6 +30,12 @@ variable "vpn_status_silenced" { default = {} } +variable "vpn_status_extra_tags" { + description = "Extra tags for VPN status monitor" + type = "list" + default = [] +} + variable "vpn_status_message" { description = "Custom message for VPN status monitor" type = "string" diff --git a/cloud/aws/vpn/monitors-vpn.tf b/cloud/aws/vpn/monitors-vpn.tf index ba7d110..4117502 100644 --- a/cloud/aws/vpn/monitors-vpn.tf +++ b/cloud/aws/vpn/monitors-vpn.tf @@ -21,5 +21,5 @@ resource "datadog_monitor" "VPN_status" { silenced = "${var.vpn_status_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:vpn", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:vpn", "team:claranet", "created-by:terraform", "${var.vpn_status_extra_tags}"] } diff --git a/cloud/azure/apimanagement/README.md b/cloud/azure/apimanagement/README.md index f2ba253..908ab4b 100644 --- a/cloud/azure/apimanagement/README.md +++ b/cloud/azure/apimanagement/README.md @@ -28,6 +28,7 @@ Creates DataDog monitors with the following checks: |------|-------------|:----:|:-----:|:-----:| | environment | Architecture environment | string | - | yes | | evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | +| failed_requests_extra_tags | Extra tags for API Management failed requests monitor | list | `` | no | | failed_requests_message | Custom message for API Management failed requests monitor | string | `` | no | | failed_requests_silenced | Groups to mute for API Management failed requests monitor | map | `` | no | | failed_requests_threshold_critical | Maximum acceptable percent of failed requests | string | `90` | no | @@ -37,20 +38,24 @@ Creates DataDog monitors with the following checks: | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when a Redis monitor is triggered | string | - | yes | | new_host_delay | Delay in seconds before monitor new resource | string | `300` | no | +| other_requests_extra_tags | Extra tags for API Management other requests monitor | list | `` | no | | other_requests_message | Custom message for API Management other requests monitor | string | `` | no | | other_requests_silenced | Groups to mute for API Management other requests monitor | map | `` | no | | other_requests_threshold_critical | Maximum acceptable percent of other requests | string | `90` | no | | other_requests_threshold_warning | Warning regarding acceptable percent of other requests | string | `50` | no | | other_requests_timeframe | Monitor timeframe for API Management other requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| status_extra_tags | Extra tags for API Management status monitor | list | `` | no | | status_message | Custom message for API Management status monitor | string | `` | no | | status_silenced | Groups to mute for API Management status monitor | map | `` | no | | status_time_aggregator | Monitor aggregator for API Management status [available values: min, max or avg] | string | `max` | no | | status_timeframe | Monitor timeframe for API Management status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| successful_requests_extra_tags | Extra tags for API Management successful requests monitor | list | `` | no | | successful_requests_message | Custom message for API Management successful requests monitor | string | `` | no | | successful_requests_silenced | Groups to mute for API Management successful requests monitor | map | `` | no | | successful_requests_threshold_critical | Minimum acceptable percent of successful requests | string | `10` | no | | successful_requests_threshold_warning | Warning regarding acceptable percent of successful requests | string | `30` | no | | successful_requests_timeframe | Monitor timeframe for API Management successful requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| unauthorized_requests_extra_tags | Extra tags for API Management unauthorized requests monitor | list | `` | no | | unauthorized_requests_message | Custom message for API Management unauthorized requests monitor | string | `` | no | | unauthorized_requests_silenced | Groups to mute for API Management unauthorized requests monitor | map | `` | no | | unauthorized_requests_threshold_critical | Maximum acceptable percent of unauthorized requests | string | `90` | no | diff --git a/cloud/azure/apimanagement/inputs.tf b/cloud/azure/apimanagement/inputs.tf index 2effcaa..4a012fa 100644 --- a/cloud/azure/apimanagement/inputs.tf +++ b/cloud/azure/apimanagement/inputs.tf @@ -36,6 +36,12 @@ variable "status_silenced" { default = {} } +variable "status_extra_tags" { + description = "Extra tags for API Management status monitor" + type = "list" + default = [] +} + variable "status_message" { description = "Custom message for API Management status monitor" type = "string" @@ -60,6 +66,12 @@ variable "failed_requests_silenced" { default = {} } +variable "failed_requests_extra_tags" { + description = "Extra tags for API Management failed requests monitor" + type = "list" + default = [] +} + variable "failed_requests_message" { description = "Custom message for API Management failed requests monitor" type = "string" @@ -88,6 +100,12 @@ variable "other_requests_silenced" { default = {} } +variable "other_requests_extra_tags" { + description = "Extra tags for API Management other requests monitor" + type = "list" + default = [] +} + variable "other_requests_message" { description = "Custom message for API Management other requests monitor" type = "string" @@ -116,6 +134,12 @@ variable "unauthorized_requests_silenced" { default = {} } +variable "unauthorized_requests_extra_tags" { + description = "Extra tags for API Management unauthorized requests monitor" + type = "list" + default = [] +} + variable "unauthorized_requests_message" { description = "Custom message for API Management unauthorized requests monitor" type = "string" @@ -144,6 +168,12 @@ variable "successful_requests_silenced" { default = {} } +variable "successful_requests_extra_tags" { + description = "Extra tags for API Management successful requests monitor" + type = "list" + default = [] +} + variable "successful_requests_message" { description = "Custom message for API Management successful requests monitor" type = "string" diff --git a/cloud/azure/apimanagement/monitors-azure-apimanagement.tf b/cloud/azure/apimanagement/monitors-azure-apimanagement.tf index 0487e66..6c91665 100644 --- a/cloud/azure/apimanagement/monitors-azure-apimanagement.tf +++ b/cloud/azure/apimanagement/monitors-azure-apimanagement.tf @@ -24,7 +24,7 @@ resource "datadog_monitor" "apimgt_status" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:apimanagement", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:apimanagement", "team:claranet", "created-by:terraform", "${var.status_extra_tags}"] } resource "datadog_monitor" "apimgt_failed_requests" { @@ -56,7 +56,7 @@ resource "datadog_monitor" "apimgt_failed_requests" { evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:apimanagement", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:apimanagement", "team:claranet", "created-by:terraform", "${var.failed_requests_extra_tags}"] } resource "datadog_monitor" "apimgt_other_requests" { @@ -88,7 +88,7 @@ resource "datadog_monitor" "apimgt_other_requests" { evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:apimanagement", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:apimanagement", "team:claranet", "created-by:terraform", "${var.other_requests_extra_tags}"] } resource "datadog_monitor" "apimgt_unauthorized_requests" { @@ -120,7 +120,7 @@ resource "datadog_monitor" "apimgt_unauthorized_requests" { evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:apimanagement", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:apimanagement", "team:claranet", "created-by:terraform", "${var.unauthorized_requests_extra_tags}"] } resource "datadog_monitor" "apimgt_successful_requests" { @@ -152,5 +152,5 @@ resource "datadog_monitor" "apimgt_successful_requests" { evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:apimanagement", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:apimanagement", "team:claranet", "created-by:terraform", "${var.successful_requests_extra_tags}"] } diff --git a/cloud/azure/app-services/README.md b/cloud/azure/app-services/README.md index 6f42f5a..e2a7d71 100644 --- a/cloud/azure/app-services/README.md +++ b/cloud/azure/app-services/README.md @@ -30,21 +30,25 @@ Creates DataDog monitors with the following checks: | evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | +| http_4xx_requests_extra_tags | Extra tags for App Services 4xx requests monitor | list | `` | no | | http_4xx_requests_message | Custom message for App Services 4xx requests monitor | string | `` | no | | http_4xx_requests_silenced | Groups to mute for App Services 4xx requests monitor | map | `` | no | | http_4xx_requests_threshold_critical | Maximum critical acceptable percent of 4xx errors | string | `90` | no | | http_4xx_requests_threshold_warning | Warning regarding acceptable percent of 4xx errors | string | `50` | no | | http_4xx_requests_timeframe | Monitor timeframe for App Services 4xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| http_5xx_requests_extra_tags | Extra tags for App Services 5xx requests monitor | list | `` | no | | http_5xx_requests_message | Custom message for App Services 5xx requests monitor | string | `` | no | | http_5xx_requests_silenced | Groups to mute for App Services 5xx requests monitor | map | `` | no | | http_5xx_requests_threshold_critical | Maximum critical acceptable percent of 5xx errors | string | `90` | no | | http_5xx_requests_threshold_warning | Warning regarding acceptable percent of 5xx errors | string | `50` | no | | http_5xx_requests_timeframe | Monitor timeframe for App Services 5xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| http_successful_requests_extra_tags | Extra tags for App Services successful requests monitor | list | `` | no | | http_successful_requests_message | Custom message for App Services successful requests monitor | string | `` | no | | http_successful_requests_silenced | Groups to mute for App Services successful requests monitor | map | `` | no | | http_successful_requests_threshold_critical | Minimum critical acceptable percent of 2xx & 3xx requests | string | `10` | no | | http_successful_requests_threshold_warning | Warning regarding acceptable percent of 2xx & 3xx requests | string | `30` | no | | http_successful_requests_timeframe | Monitor timeframe for App Services successful requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| memory_usage_extra_tags | Extra tags for App Services memory usage monitor | list | `` | no | | memory_usage_message | Custom message for App Services memory usage monitor | string | `` | no | | memory_usage_silenced | Groups to mute for App Services memory usage monitor | map | `` | no | | memory_usage_threshold_critical | Alerting threshold in Mib | string | `1073741824` | no | @@ -53,6 +57,7 @@ Creates DataDog monitors with the following checks: | memory_usage_timeframe | Monitor timeframe for App Services memory usage [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | message | Message sent when a monitor is triggered | string | - | yes | | new_host_delay | Delay in seconds before monitor new resource | string | `300` | no | +| response_time_extra_tags | Extra tags for App Services response time monitor | list | `` | no | | response_time_message | Custom message for App Services response time monitor | string | `` | no | | response_time_silenced | Groups to mute for App Services response time monitor | map | `` | no | | response_time_threshold_critical | Alerting threshold for response time in seconds | string | `10` | no | diff --git a/cloud/azure/app-services/inputs.tf b/cloud/azure/app-services/inputs.tf index 62870c6..04df4e3 100644 --- a/cloud/azure/app-services/inputs.tf +++ b/cloud/azure/app-services/inputs.tf @@ -34,6 +34,12 @@ variable "response_time_silenced" { default = {} } +variable "response_time_extra_tags" { + description = "Extra tags for App Services response time monitor" + type = "list" + default = [] +} + variable "response_time_message" { description = "Custom message for App Services response time monitor" type = "string" @@ -68,6 +74,12 @@ variable "memory_usage_silenced" { default = {} } +variable "memory_usage_extra_tags" { + description = "Extra tags for App Services memory usage monitor" + type = "list" + default = [] +} + variable "memory_usage_message" { description = "Custom message for App Services memory usage monitor" type = "string" @@ -102,6 +114,12 @@ variable "http_4xx_requests_silenced" { default = {} } +variable "http_4xx_requests_extra_tags" { + description = "Extra tags for App Services 4xx requests monitor" + type = "list" + default = [] +} + variable "http_4xx_requests_message" { description = "Custom message for App Services 4xx requests monitor" type = "string" @@ -130,6 +148,12 @@ variable "http_5xx_requests_silenced" { default = {} } +variable "http_5xx_requests_extra_tags" { + description = "Extra tags for App Services 5xx requests monitor" + type = "list" + default = [] +} + variable "http_5xx_requests_message" { description = "Custom message for App Services 5xx requests monitor" type = "string" @@ -158,6 +182,12 @@ variable "http_successful_requests_silenced" { default = {} } +variable "http_successful_requests_extra_tags" { + description = "Extra tags for App Services successful requests monitor" + type = "list" + default = [] +} + variable "http_successful_requests_message" { description = "Custom message for App Services successful requests monitor" type = "string" diff --git a/cloud/azure/app-services/monitors-app_services.tf b/cloud/azure/app-services/monitors-app_services.tf index 6f3a92e..346ba22 100644 --- a/cloud/azure/app-services/monitors-app_services.tf +++ b/cloud/azure/app-services/monitors-app_services.tf @@ -26,7 +26,7 @@ resource "datadog_monitor" "appservices_response_time" { timeout_h = 0 include_tags = true - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:app-services", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:app-services", "team:claranet", "created-by:terraform", "${var.response_time_extra_tags}"] } # Monitoring App Services memory usage @@ -57,7 +57,7 @@ resource "datadog_monitor" "appservices_memory_usage_count" { timeout_h = 0 include_tags = true - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:app-services", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:app-services", "team:claranet", "created-by:terraform", "${var.memory_usage_extra_tags}"] } # Monitoring App Services 5xx errors percent @@ -89,7 +89,7 @@ resource "datadog_monitor" "appservices_http_5xx_errors_count" { timeout_h = 1 include_tags = true - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:app-services", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:app-services", "team:claranet", "created-by:terraform", "${var.http_5xx_requests_extra_tags}"] } # Monitoring App Services 4xx errors percent @@ -121,7 +121,7 @@ resource "datadog_monitor" "appservices_http_4xx_errors_count" { timeout_h = 1 include_tags = true - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:app-services", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:app-services", "team:claranet", "created-by:terraform", "${var.http_4xx_requests_extra_tags}"] } # Monitoring App Services HTTP 2xx & 3xx status pages percent @@ -154,5 +154,5 @@ resource "datadog_monitor" "appservices_http_success_status_rate" { timeout_h = 1 include_tags = true - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:app-services", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:app-services", "team:claranet", "created-by:terraform", "${var.http_successful_requests_extra_tags}"] } diff --git a/cloud/azure/eventhub/README.md b/cloud/azure/eventhub/README.md index ef43987..48666bc 100644 --- a/cloud/azure/eventhub/README.md +++ b/cloud/azure/eventhub/README.md @@ -25,12 +25,14 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| | environment | Architecture environment | string | - | yes | +| errors_rate_extra_tags | Extra tags for Event Hub errors monitor | list | `` | no | | errors_rate_message | Custom message for Event Hub errors monitor | string | `` | no | | errors_rate_silenced | Groups to mute for Event Hub errors monitor | map | `` | no | | errors_rate_thresold_critical | Errors ratio (percentage) to trigger the critical alert | string | `90` | no | | errors_rate_thresold_warning | Errors ratio (percentage) to trigger a warning alert | string | `50` | no | | errors_rate_timeframe | Monitor timeframe for Event Hub errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | +| failed_requests_rate_extra_tags | Extra tags for Event Hub failed requests monitor | list | `` | no | | failed_requests_rate_message | Custom message for Event Hub failed requests monitor | string | `` | no | | failed_requests_rate_silenced | Groups to mute for Event Hub failed requests monitor | map | `` | no | | failed_requests_rate_thresold_critical | Failed requests ratio (percentage) to trigger the critical alert | string | `90` | no | @@ -40,6 +42,7 @@ Creates DataDog monitors with the following checks: | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when an alert is triggered | string | - | yes | | new_host_delay | Delay in seconds before monitor new resource | string | `300` | no | +| status_extra_tags | Extra tags for Event Hub status monitor | list | `` | no | | status_message | Custom message for Event Hub status monitor | string | `` | no | | status_silenced | Groups to mute for Event Hub status monitor | map | `` | no | | status_time_aggregator | Monitor aggregator for Event Hub status [available values: min, max or avg] | string | `max` | no | diff --git a/cloud/azure/eventhub/inputs.tf b/cloud/azure/eventhub/inputs.tf index 1fccb08..95757ae 100644 --- a/cloud/azure/eventhub/inputs.tf +++ b/cloud/azure/eventhub/inputs.tf @@ -36,6 +36,12 @@ variable "status_silenced" { default = {} } +variable "status_extra_tags" { + description = "Extra tags for Event Hub status monitor" + type = "list" + default = [] +} + variable "status_message" { description = "Custom message for Event Hub status monitor" type = "string" @@ -60,6 +66,12 @@ variable "failed_requests_rate_silenced" { default = {} } +variable "failed_requests_rate_extra_tags" { + description = "Extra tags for Event Hub failed requests monitor" + type = "list" + default = [] +} + variable "failed_requests_rate_message" { description = "Custom message for Event Hub failed requests monitor" type = "string" @@ -88,6 +100,12 @@ variable "errors_rate_silenced" { default = {} } +variable "errors_rate_extra_tags" { + description = "Extra tags for Event Hub errors monitor" + type = "list" + default = [] +} + variable "errors_rate_message" { description = "Custom message for Event Hub errors monitor" type = "string" diff --git a/cloud/azure/eventhub/monitors-eventhub.tf b/cloud/azure/eventhub/monitors-eventhub.tf index b31fdf0..e7520a1 100644 --- a/cloud/azure/eventhub/monitors-eventhub.tf +++ b/cloud/azure/eventhub/monitors-eventhub.tf @@ -22,7 +22,7 @@ resource "datadog_monitor" "eventhub_status" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:eventhub", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:eventhub", "team:claranet", "created-by:terraform", "${var.status_extra_tags}"] } resource "datadog_monitor" "eventhub_failed_requests" { @@ -57,7 +57,7 @@ resource "datadog_monitor" "eventhub_failed_requests" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:eventhub", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:eventhub", "team:claranet", "created-by:terraform", "${var.failed_requests_rate_extra_tags}"] } resource "datadog_monitor" "eventhub_errors" { @@ -97,5 +97,5 @@ resource "datadog_monitor" "eventhub_errors" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:eventhub", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:eventhub", "team:claranet", "created-by:terraform", "${var.errors_rate_extra_tags}"] } diff --git a/cloud/azure/iothubs/README.md b/cloud/azure/iothubs/README.md index 53eeee5..c569c75 100644 --- a/cloud/azure/iothubs/README.md +++ b/cloud/azure/iothubs/README.md @@ -35,6 +35,7 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| dropped_d2c_telemetry_egress_extra_tags | Extra tags for IoT Hub dropped d2c telemetry monitor | list | `` | no | | dropped_d2c_telemetry_egress_message | Custom message for IoT Hub dropped d2c telemetry monitor | string | `` | no | | dropped_d2c_telemetry_egress_rate_threshold_critical | D2C Telemetry Dropped limit (critical threshold) | string | `90` | no | | dropped_d2c_telemetry_egress_rate_threshold_warning | D2C Telemetry Dropped limit (warning threshold) | string | `50` | no | @@ -42,47 +43,56 @@ Creates DataDog monitors with the following checks: | dropped_d2c_telemetry_egress_timeframe | Monitor timeframe for IoT Hub dropped d2c telemetry [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | environment | Architecture Environment | string | - | yes | | evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | +| failed_c2d_methods_rate_extra_tags | Extra tags for IoT Hub failed c2d methods monitor | list | `` | no | | failed_c2d_methods_rate_message | Custom message for IoT Hub failed c2d method monitor | string | `` | no | | failed_c2d_methods_rate_silenced | Groups to mute for IoT Hub failed c2d methods monitor | map | `` | no | | failed_c2d_methods_rate_threshold_critical | C2D Methods Failed rate limit (critical threshold) | string | `90` | no | | failed_c2d_methods_rate_threshold_warning | C2D Methods Failed rate limit (warning threshold) | string | `50` | no | | failed_c2d_methods_rate_timeframe | Monitor timeframe for IoT Hub failed c2d method [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| failed_c2d_twin_read_rate_extra_tags | Extra tags for IoT Hub failed c2d twin read monitor | list | `` | no | | failed_c2d_twin_read_rate_message | Custom message for IoT Hub failed c2d twin read monitor | string | `` | no | | failed_c2d_twin_read_rate_silenced | Groups to mute for IoT Hub failed c2d twin read monitor | map | `` | no | | failed_c2d_twin_read_rate_threshold_critical | C2D Twin Read Failed rate limit (critical threshold) | string | `90` | no | | failed_c2d_twin_read_rate_threshold_warning | C2D Twin Read Failed rate limit (warning threshold) | string | `50` | no | | failed_c2d_twin_read_rate_timeframe | Monitor timeframe for IoT Hub failed c2d twin read [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| failed_c2d_twin_update_rate_extra_tags | Extra tags for IoT Hub failed c2d twin update monitor | list | `` | no | | failed_c2d_twin_update_rate_message | Custom message for IoT Hub failed c2d twin update monitor | string | `` | no | | failed_c2d_twin_update_rate_silenced | Groups to mute for IoT Hub failed c2d twin update monitor | map | `` | no | | failed_c2d_twin_update_rate_threshold_critical | C2D Twin Update Failed rate limit (critical threshold) | string | `90` | no | | failed_c2d_twin_update_rate_threshold_warning | C2D Twin Update Failed rate limit (warning threshold) | string | `50` | no | | failed_c2d_twin_update_rate_timeframe | Monitor timeframe for IoT Hub failed c2d twin update [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| failed_d2c_twin_read_rate_extra_tags | Extra tags for IoT Hub failed d2c twin read monitor | list | `` | no | | failed_d2c_twin_read_rate_message | Custom message for IoT Hub failed d2c twin read monitor | string | `` | no | | failed_d2c_twin_read_rate_silenced | Groups to mute for IoT Hub failed d2c twin read monitor | map | `` | no | | failed_d2c_twin_read_rate_threshold_critical | D2C Twin Read Failed rate limit (critical threshold) | string | `90` | no | | failed_d2c_twin_read_rate_threshold_warning | D2C Twin Read Failed rate limit (warning threshold) | string | `50` | no | | failed_d2c_twin_read_rate_timeframe | Monitor timeframe for IoT Hub failed d2c twin read [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| failed_d2c_twin_update_rate_extra_tags | Extra tags for IoT Hub failed d2c twin update monitor | list | `` | no | | failed_d2c_twin_update_rate_message | Custom message for IoT Hub failed d2c twin update monitor | string | `` | no | | failed_d2c_twin_update_rate_silenced | Groups to mute for IoT Hub failed d2c twin update monitor | map | `` | no | | failed_d2c_twin_update_rate_threshold_critical | D2C Twin Update Failed rate limit (critical threshold) | string | `90` | no | | failed_d2c_twin_update_rate_threshold_warning | D2C Twin Update Failed rate limit (warning threshold) | string | `50` | no | | failed_d2c_twin_update_rate_timeframe | Monitor timeframe for IoT Hub failed d2c twin update [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| failed_jobs_rate_extra_tags | Extra tags for IoT Hub failed jobs monitor | list | `` | no | | failed_jobs_rate_message | Custom message for IoT Hub failed jobs monitor | string | `` | no | | failed_jobs_rate_silenced | Groups to mute for IoT Hub failed jobs monitor | map | `` | no | | failed_jobs_rate_threshold_critical | Jobs Failed rate limit (critical threshold) | string | `90` | no | | failed_jobs_rate_threshold_warning | Jobs Failed rate limit (warning threshold) | string | `50` | no | | failed_jobs_rate_timeframe | Monitor timeframe for IoT Hub failed jobs [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| failed_listjobs_rate_extra_tags | Extra tags for IoT Hub failed list jobs monitor | list | `` | no | | failed_listjobs_rate_message | Custom message for IoT Hub failed list jobs monitor | string | `` | no | | failed_listjobs_rate_silenced | Groups to mute for IoT Hub failed list jobs monitor | map | `` | no | | failed_listjobs_rate_threshold_critical | ListJobs Failed rate limit (critical threshold) | string | `90` | no | | failed_listjobs_rate_threshold_warning | ListJobs Failed rate limit (warning threshold) | string | `50` | no | | failed_listjobs_rate_timeframe | Monitor timeframe for IoT Hub failed list jobs [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| failed_queryjobs_rate_extra_tags | Extra tags for IoT Hub failed query jobs monitor | list | `` | no | | failed_queryjobs_rate_message | Custom message for IoT Hub failed query jobs monitor | string | `` | no | | failed_queryjobs_rate_silenced | Groups to mute for IoT Hub failed query jobs monitor | map | `` | no | | failed_queryjobs_rate_threshold_critical | QueryJobs Failed rate limit (critical threshold) | string | `90` | no | | failed_queryjobs_rate_threshold_warning | QueryJobs Failed rate limit (warning threshold) | string | `50` | no | | failed_queryjobs_rate_timeframe | Monitor timeframe for IoT Hub failed query jobs [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | filter_tags | Tags used for filtering | string | `*` | no | +| invalid_d2c_telemetry_egress_extra_tags | Extra tags for IoT Hub invalid d2c telemetry monitor | list | `` | no | | invalid_d2c_telemetry_egress_message | Custom message for IoT Hub invalid d2c telemetry monitor | string | `` | no | | invalid_d2c_telemetry_egress_rate_threshold_critical | D2C Telemetry Invalid limit (critical threshold) | string | `90` | no | | invalid_d2c_telemetry_egress_rate_threshold_warning | D2C Telemetry Invalid limit (warning threshold) | string | `50` | no | @@ -90,18 +100,22 @@ Creates DataDog monitors with the following checks: | invalid_d2c_telemetry_egress_timeframe | Monitor timeframe for IoT Hub invalid d2c telemetry [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | message | Message sent when an alert is triggered | string | - | yes | | new_host_delay | Delay in seconds before monitor new resource | string | `300` | no | +| orphaned_d2c_telemetry_egress_extra_tags | Extra tags for IoT Hub orphaned d2c telemetry monitor | list | `` | no | | orphaned_d2c_telemetry_egress_message | Custom message for IoT Hub orphaned d2c telemetry monitor | string | `` | no | | orphaned_d2c_telemetry_egress_rate_threshold_critical | D2C Telemetry Orphaned limit (critical threshold) | string | `90` | no | | orphaned_d2c_telemetry_egress_rate_threshold_warning | D2C Telemetry Orphaned limit (warning threshold) | string | `50` | no | | orphaned_d2c_telemetry_egress_silenced | Groups to mute for IoT Hub orphaned d2c telemetry monitor | map | `` | no | | orphaned_d2c_telemetry_egress_timeframe | Monitor timeframe for IoT Hub orphaned d2c telemetry [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| status_extra_tags | Extra tags for IoT Hub status monitor | list | `` | no | | status_message | Custom message for IoT Hub status monitor | string | `` | no | | status_silenced | Groups to mute for IoT Hub status monitor | map | `` | no | | status_time_aggregator | Monitor aggregator for IoT Hub status [available values: min, max, sum or avg] | string | `max` | no | | status_timeframe | Monitor timeframe for IoT Hub status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| too_many_d2c_telemetry_ingress_nosent_extra_tags | Extra tags for IoT Hub unsent d2c telemetry monitor | list | `` | no | | too_many_d2c_telemetry_ingress_nosent_message | Custom message for IoT Hub unsent d2c telemetry monitor | string | `` | no | | too_many_d2c_telemetry_ingress_nosent_silenced | Groups to mute for IoT Hub unsent d2c telemetry monitor | map | `` | no | | too_many_d2c_telemetry_ingress_nosent_timeframe | Monitor timeframe for IoT Hub unsent d2c telemetry [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| total_devices_extra_tags | Extra tags for IoT Hub total devices monitor | list | `` | no | | total_devices_message | Custom message for IoT Hub total devices monitor | string | `` | no | | total_devices_silenced | Groups to mute for IoT Hub total devices monitor | map | `` | no | | total_devices_time_aggregator | Monitor aggregator for IoT Hub total devices [available values: min, max, sum or avg] | string | `min` | no | diff --git a/cloud/azure/iothubs/inputs.tf b/cloud/azure/iothubs/inputs.tf index 84335e8..54196a1 100644 --- a/cloud/azure/iothubs/inputs.tf +++ b/cloud/azure/iothubs/inputs.tf @@ -31,6 +31,12 @@ variable "status_silenced" { default = {} } +variable "status_extra_tags" { + description = "Extra tags for IoT Hub status monitor" + type = "list" + default = [] +} + variable "status_message" { description = "Custom message for IoT Hub status monitor" type = "string" @@ -55,6 +61,12 @@ variable "total_devices_silenced" { default = {} } +variable "total_devices_extra_tags" { + description = "Extra tags for IoT Hub total devices monitor" + type = "list" + default = [] +} + variable "total_devices_message" { description = "Custom message for IoT Hub total devices monitor" type = "string" @@ -79,6 +91,12 @@ variable "too_many_d2c_telemetry_ingress_nosent_silenced" { default = {} } +variable "too_many_d2c_telemetry_ingress_nosent_extra_tags" { + description = "Extra tags for IoT Hub unsent d2c telemetry monitor" + type = "list" + default = [] +} + variable "too_many_d2c_telemetry_ingress_nosent_message" { description = "Custom message for IoT Hub unsent d2c telemetry monitor" type = "string" @@ -97,6 +115,12 @@ variable "failed_jobs_rate_silenced" { default = {} } +variable "failed_jobs_rate_extra_tags" { + description = "Extra tags for IoT Hub failed jobs monitor" + type = "list" + default = [] +} + variable "failed_jobs_rate_message" { description = "Custom message for IoT Hub failed jobs monitor" type = "string" @@ -125,6 +149,12 @@ variable "failed_listjobs_rate_silenced" { default = {} } +variable "failed_listjobs_rate_extra_tags" { + description = "Extra tags for IoT Hub failed list jobs monitor" + type = "list" + default = [] +} + variable "failed_listjobs_rate_message" { description = "Custom message for IoT Hub failed list jobs monitor" type = "string" @@ -153,6 +183,12 @@ variable "failed_queryjobs_rate_silenced" { default = {} } +variable "failed_queryjobs_rate_extra_tags" { + description = "Extra tags for IoT Hub failed query jobs monitor" + type = "list" + default = [] +} + variable "failed_queryjobs_rate_message" { description = "Custom message for IoT Hub failed query jobs monitor" type = "string" @@ -181,6 +217,12 @@ variable "failed_c2d_methods_rate_silenced" { default = {} } +variable "failed_c2d_methods_rate_extra_tags" { + description = "Extra tags for IoT Hub failed c2d methods monitor" + type = "list" + default = [] +} + variable "failed_c2d_methods_rate_message" { description = "Custom message for IoT Hub failed c2d method monitor" type = "string" @@ -209,6 +251,12 @@ variable "failed_c2d_twin_read_rate_silenced" { default = {} } +variable "failed_c2d_twin_read_rate_extra_tags" { + description = "Extra tags for IoT Hub failed c2d twin read monitor" + type = "list" + default = [] +} + variable "failed_c2d_twin_read_rate_message" { description = "Custom message for IoT Hub failed c2d twin read monitor" type = "string" @@ -237,6 +285,12 @@ variable "failed_c2d_twin_update_rate_silenced" { default = {} } +variable "failed_c2d_twin_update_rate_extra_tags" { + description = "Extra tags for IoT Hub failed c2d twin update monitor" + type = "list" + default = [] +} + variable "failed_c2d_twin_update_rate_message" { description = "Custom message for IoT Hub failed c2d twin update monitor" type = "string" @@ -265,6 +319,12 @@ variable "failed_d2c_twin_read_rate_silenced" { default = {} } +variable "failed_d2c_twin_read_rate_extra_tags" { + description = "Extra tags for IoT Hub failed d2c twin read monitor" + type = "list" + default = [] +} + variable "failed_d2c_twin_read_rate_message" { description = "Custom message for IoT Hub failed d2c twin read monitor" type = "string" @@ -293,6 +353,12 @@ variable "failed_d2c_twin_update_rate_silenced" { default = {} } +variable "failed_d2c_twin_update_rate_extra_tags" { + description = "Extra tags for IoT Hub failed d2c twin update monitor" + type = "list" + default = [] +} + variable "failed_d2c_twin_update_rate_message" { description = "Custom message for IoT Hub failed d2c twin update monitor" type = "string" @@ -321,6 +387,12 @@ variable "dropped_d2c_telemetry_egress_silenced" { default = {} } +variable "dropped_d2c_telemetry_egress_extra_tags" { + description = "Extra tags for IoT Hub dropped d2c telemetry monitor" + type = "list" + default = [] +} + variable "dropped_d2c_telemetry_egress_message" { description = "Custom message for IoT Hub dropped d2c telemetry monitor" type = "string" @@ -349,6 +421,12 @@ variable "orphaned_d2c_telemetry_egress_silenced" { default = {} } +variable "orphaned_d2c_telemetry_egress_extra_tags" { + description = "Extra tags for IoT Hub orphaned d2c telemetry monitor" + type = "list" + default = [] +} + variable "orphaned_d2c_telemetry_egress_message" { description = "Custom message for IoT Hub orphaned d2c telemetry monitor" type = "string" @@ -377,6 +455,12 @@ variable "invalid_d2c_telemetry_egress_silenced" { default = {} } +variable "invalid_d2c_telemetry_egress_extra_tags" { + description = "Extra tags for IoT Hub invalid d2c telemetry monitor" + type = "list" + default = [] +} + variable "invalid_d2c_telemetry_egress_message" { description = "Custom message for IoT Hub invalid d2c telemetry monitor" type = "string" diff --git a/cloud/azure/iothubs/monitors-iothubs.tf b/cloud/azure/iothubs/monitors-iothubs.tf index b80cc43..d144213 100644 --- a/cloud/azure/iothubs/monitors-iothubs.tf +++ b/cloud/azure/iothubs/monitors-iothubs.tf @@ -29,7 +29,7 @@ resource "datadog_monitor" "too_many_jobs_failed" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.failed_jobs_rate_extra_tags}"] } resource "datadog_monitor" "too_many_list_jobs_failed" { @@ -63,7 +63,7 @@ resource "datadog_monitor" "too_many_list_jobs_failed" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.failed_listjobs_rate_extra_tags}"] } resource "datadog_monitor" "too_many_query_jobs_failed" { @@ -97,7 +97,7 @@ resource "datadog_monitor" "too_many_query_jobs_failed" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.failed_queryjobs_rate_extra_tags}"] } resource "datadog_monitor" "status" { @@ -124,7 +124,7 @@ resource "datadog_monitor" "status" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.status_extra_tags}"] } resource "datadog_monitor" "total_devices" { @@ -151,7 +151,7 @@ resource "datadog_monitor" "total_devices" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.total_devices_extra_tags}"] } resource "datadog_monitor" "too_many_c2d_methods_failed" { @@ -185,7 +185,7 @@ resource "datadog_monitor" "too_many_c2d_methods_failed" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.failed_c2d_methods_rate_extra_tags}"] } resource "datadog_monitor" "too_many_c2d_twin_read_failed" { @@ -219,7 +219,7 @@ resource "datadog_monitor" "too_many_c2d_twin_read_failed" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.failed_c2d_twin_read_rate_extra_tags}"] } resource "datadog_monitor" "too_many_c2d_twin_update_failed" { @@ -253,7 +253,7 @@ resource "datadog_monitor" "too_many_c2d_twin_update_failed" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.failed_c2d_twin_update_rate_extra_tags}"] } resource "datadog_monitor" "too_many_d2c_twin_read_failed" { @@ -287,7 +287,7 @@ resource "datadog_monitor" "too_many_d2c_twin_read_failed" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.failed_d2c_twin_read_rate_extra_tags}"] } resource "datadog_monitor" "too_many_d2c_twin_update_failed" { @@ -321,7 +321,7 @@ resource "datadog_monitor" "too_many_d2c_twin_update_failed" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.failed_d2c_twin_update_rate_extra_tags}"] } resource "datadog_monitor" "too_many_d2c_telemetry_egress_dropped" { @@ -358,7 +358,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_dropped" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.dropped_d2c_telemetry_egress_extra_tags}"] } resource "datadog_monitor" "too_many_d2c_telemetry_egress_orphaned" { @@ -395,7 +395,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_orphaned" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.orphaned_d2c_telemetry_egress_extra_tags}"] } resource "datadog_monitor" "too_many_d2c_telemetry_egress_invalid" { @@ -432,7 +432,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_invalid" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.invalid_d2c_telemetry_egress_extra_tags}"] } resource "datadog_monitor" "too_many_d2c_telemetry_ingress_nosent" { @@ -460,5 +460,5 @@ resource "datadog_monitor" "too_many_d2c_telemetry_ingress_nosent" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform", "${var.too_many_d2c_telemetry_ingress_nosent_extra_tags}"] } diff --git a/cloud/azure/redis/README.md b/cloud/azure/redis/README.md index 9261315..bfd3e2a 100644 --- a/cloud/azure/redis/README.md +++ b/cloud/azure/redis/README.md @@ -27,6 +27,7 @@ Creates DataDog monitors with the following checks: |------|-------------|:----:|:-----:|:-----:| | environment | Architecture environment | string | - | yes | | evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | +| evictedkeys_limit_extra_tags | Extra tags for Redis evicted keys monitor | list | `` | no | | evictedkeys_limit_message | Custom message for Redis evicted keys monitor | string | `` | no | | evictedkeys_limit_silenced | Groups to mute for Redis evicted keys monitor | map | `` | no | | evictedkeys_limit_threshold_critical | Evicted keys limit (critical threshold) | string | `100` | no | @@ -37,18 +38,21 @@ Creates DataDog monitors with the following checks: | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when a Redis monitor is triggered | string | - | yes | | new_host_delay | Delay in seconds before monitor new resource | string | `300` | no | +| percent_processor_time_extra_tags | Extra tags for Redis processor monitor | list | `` | no | | percent_processor_time_message | Custom message for Redis processor monitor | string | `` | no | | percent_processor_time_silenced | Groups to mute for Redis processor monitor | map | `` | no | | percent_processor_time_threshold_critical | Processor time percent (critical threshold) | string | `80` | no | | percent_processor_time_threshold_warning | Processor time percent (warning threshold) | string | `60` | no | | percent_processor_time_time_aggregator | Monitor aggregator for Redis processor [available values: min, max or avg] | string | `min` | no | | percent_processor_time_timeframe | Monitor timeframe for Redis processor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| server_load_rate_extra_tags | Extra tags for Redis server load monitor | list | `` | no | | server_load_rate_message | Custom message for Redis server load monitor | string | `` | no | | server_load_rate_silenced | Groups to mute for Redis server load monitor | map | `` | no | | server_load_rate_threshold_critical | Server CPU load rate (critical threshold) | string | `90` | no | | server_load_rate_threshold_warning | Server CPU load rate (warning threshold) | string | `70` | no | | server_load_rate_time_aggregator | Monitor aggregator for Redis server load [available values: min, max or avg] | string | `min` | no | | server_load_rate_timeframe | Monitor timeframe for Redis server load [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| status_extra_tags | Extra tags for Redis status monitor | list | `` | no | | status_message | Custom message for Redis status monitor | string | `` | no | | status_silenced | Groups to mute for Redis status monitor | map | `` | no | | status_time_aggregator | Monitor aggregator for Redis status [available values: min, max or avg] | string | `max` | no | diff --git a/cloud/azure/redis/inputs.tf b/cloud/azure/redis/inputs.tf index 136496f..6f4465e 100644 --- a/cloud/azure/redis/inputs.tf +++ b/cloud/azure/redis/inputs.tf @@ -36,6 +36,12 @@ variable "status_silenced" { default = {} } +variable "status_extra_tags" { + description = "Extra tags for Redis status monitor" + type = "list" + default = [] +} + variable "status_message" { description = "Custom message for Redis status monitor" type = "string" @@ -60,6 +66,12 @@ variable "evictedkeys_limit_silenced" { default = {} } +variable "evictedkeys_limit_extra_tags" { + description = "Extra tags for Redis evicted keys monitor" + type = "list" + default = [] +} + variable "evictedkeys_limit_message" { description = "Custom message for Redis evicted keys monitor" type = "string" @@ -94,6 +106,12 @@ variable "percent_processor_time_silenced" { default = {} } +variable "percent_processor_time_extra_tags" { + description = "Extra tags for Redis processor monitor" + type = "list" + default = [] +} + variable "percent_processor_time_message" { description = "Custom message for Redis processor monitor" type = "string" @@ -128,6 +146,12 @@ variable "server_load_rate_silenced" { default = {} } +variable "server_load_rate_extra_tags" { + description = "Extra tags for Redis server load monitor" + type = "list" + default = [] +} + variable "server_load_rate_message" { description = "Custom message for Redis server load monitor" type = "string" diff --git a/cloud/azure/redis/monitors-azure-redis.tf b/cloud/azure/redis/monitors-azure-redis.tf index 8a076f7..82e8fb5 100644 --- a/cloud/azure/redis/monitors-azure-redis.tf +++ b/cloud/azure/redis/monitors-azure-redis.tf @@ -22,7 +22,7 @@ resource "datadog_monitor" "status" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:redis", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:redis", "team:claranet", "created-by:terraform", "${var.status_extra_tags}"] } resource "datadog_monitor" "evictedkeys" { @@ -54,7 +54,7 @@ EOF require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:redis", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:redis", "team:claranet", "created-by:terraform", "${var.evictedkeys_limit_extra_tags}"] } resource "datadog_monitor" "percent_processor_time" { @@ -86,7 +86,7 @@ EOF require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:redis", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:redis", "team:claranet", "created-by:terraform", "${var.percent_processor_time_extra_tags}"] } resource "datadog_monitor" "server_load" { @@ -118,5 +118,5 @@ EOF require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:redis", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:redis", "team:claranet", "created-by:terraform", "${var.server_load_rate_extra_tags}"] } diff --git a/cloud/azure/servicebus/README.md b/cloud/azure/servicebus/README.md index 1b63bc4..052aab1 100644 --- a/cloud/azure/servicebus/README.md +++ b/cloud/azure/servicebus/README.md @@ -28,6 +28,7 @@ Creates DataDog monitors with the following checks: | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when an alert is triggered | string | - | yes | | new_host_delay | Delay in seconds before monitor new resource | string | `300` | no | +| status_extra_tags | Extra tags for Service Bus status monitor | list | `` | no | | status_message | Custom message for Service Bus status monitor | string | `` | no | | status_silenced | Groups to mute for Service Bus status monitor | map | `` | no | | status_time_aggregator | Monitor aggregator for Service Bus status [available values: min, max or avg] | string | `max` | no | diff --git a/cloud/azure/servicebus/inputs.tf b/cloud/azure/servicebus/inputs.tf index 472a7ab..680b606 100644 --- a/cloud/azure/servicebus/inputs.tf +++ b/cloud/azure/servicebus/inputs.tf @@ -36,6 +36,12 @@ variable "status_silenced" { default = {} } +variable "status_extra_tags" { + description = "Extra tags for Service Bus status monitor" + type = "list" + default = [] +} + variable "status_message" { description = "Custom message for Service Bus status monitor" type = "string" diff --git a/cloud/azure/servicebus/monitors-service-bus.tf b/cloud/azure/servicebus/monitors-service-bus.tf index 276bd51..dc9d1ea 100644 --- a/cloud/azure/servicebus/monitors-service-bus.tf +++ b/cloud/azure/servicebus/monitors-service-bus.tf @@ -22,5 +22,5 @@ EOF require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:servicebus", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:servicebus", "team:claranet", "created-by:terraform", "${var.status_extra_tags}"] } diff --git a/cloud/azure/sql-database/README.md b/cloud/azure/sql-database/README.md index 4fd93ba..1eff63d 100644 --- a/cloud/azure/sql-database/README.md +++ b/cloud/azure/sql-database/README.md @@ -25,22 +25,26 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| cpu_extra_tags | Extra tags for SQL CPU monitor | list | `` | no | | cpu_message | Custom message for SQL CPU monitor | string | `` | no | | cpu_silenced | Groups to mute for SQL CPU monitor | map | `` | no | | cpu_threshold_critical | CPU usage in percent (critical threshold) | string | `90` | no | | cpu_threshold_warning | CPU usage in percent (warning threshold) | string | `80` | no | | cpu_time_aggregator | Monitor aggregator for SQL CPU [available values: min, max or avg] | string | `min` | no | | cpu_timeframe | Monitor timeframe for SQL CPU [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | +| deadlock_extra_tags | Extra tags for SQL Deadlock monitor | list | `` | no | | deadlock_message | Custom message for SQL Deadlock monitor | string | `` | no | | deadlock_silenced | Groups to mute for SQL Deadlock monitor | map | `` | no | | deadlock_threshold_critical | Amount of Deadlocks (critical threshold) | string | `1` | no | | deadlock_timeframe | Monitor timeframe for SQL Deadlock [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| diskspace_extra_tags | Extra tags for SQL disk space monitor | list | `` | no | | diskspace_message | Custom message for SQL disk space monitor | string | `` | no | | diskspace_silenced | Groups to mute for SQL disk space monitor | map | `` | no | | diskspace_threshold_critical | Disk space used in percent (critical threshold) | string | `90` | no | | diskspace_threshold_warning | Disk space used in percent (warning threshold) | string | `80` | no | | diskspace_time_aggregator | Monitor aggregator for SQL disk space [available values: min, max or avg] | string | `max` | no | | diskspace_timeframe | Monitor timeframe for SQL disk space [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | +| dtu_extra_tags | Extra tags for SQL DTU monitor | list | `` | no | | dtu_message | Custom message for SQL DTU monitor | string | `` | no | | dtu_silenced | Groups to mute for SQL DTU monitor | map | `` | no | | dtu_threshold_critical | Amount of DTU used (critical threshold) | string | `90` | no | diff --git a/cloud/azure/sql-database/inputs.tf b/cloud/azure/sql-database/inputs.tf index 40b84d2..7e161f6 100644 --- a/cloud/azure/sql-database/inputs.tf +++ b/cloud/azure/sql-database/inputs.tf @@ -36,6 +36,12 @@ variable "cpu_silenced" { default = {} } +variable "cpu_extra_tags" { + description = "Extra tags for SQL CPU monitor" + type = "list" + default = [] +} + variable "cpu_message" { description = "Custom message for SQL CPU monitor" type = "string" @@ -70,6 +76,12 @@ variable "diskspace_silenced" { default = {} } +variable "diskspace_extra_tags" { + description = "Extra tags for SQL disk space monitor" + type = "list" + default = [] +} + variable "diskspace_message" { description = "Custom message for SQL disk space monitor" type = "string" @@ -104,6 +116,12 @@ variable "dtu_silenced" { default = {} } +variable "dtu_extra_tags" { + description = "Extra tags for SQL DTU monitor" + type = "list" + default = [] +} + variable "dtu_message" { description = "Custom message for SQL DTU monitor" type = "string" @@ -138,6 +156,12 @@ variable "deadlock_silenced" { default = {} } +variable "deadlock_extra_tags" { + description = "Extra tags for SQL Deadlock monitor" + type = "list" + default = [] +} + variable "deadlock_message" { description = "Custom message for SQL Deadlock monitor" type = "string" diff --git a/cloud/azure/sql-database/monitors-sql-database-basics.tf b/cloud/azure/sql-database/monitors-sql-database-basics.tf index 342ddb8..b09fa1c 100644 --- a/cloud/azure/sql-database/monitors-sql-database-basics.tf +++ b/cloud/azure/sql-database/monitors-sql-database-basics.tf @@ -26,7 +26,7 @@ resource "datadog_monitor" "sql-database_cpu_90_15min" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:sql-database", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:sql-database", "team:claranet", "created-by:terraform", "${var.cpu_extra_tags}"] } resource "datadog_monitor" "sql-database_free_space_low" { @@ -58,7 +58,7 @@ resource "datadog_monitor" "sql-database_free_space_low" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:sql-database", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:sql-database", "team:claranet", "created-by:terraform", "${var.diskspace_extra_tags}"] } resource "datadog_monitor" "sql-database_dtu_consumption_high" { @@ -90,7 +90,7 @@ resource "datadog_monitor" "sql-database_dtu_consumption_high" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:sql-database", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:sql-database", "team:claranet", "created-by:terraform", "${var.dtu_extra_tags}"] } resource "datadog_monitor" "sql-database_deadlocks_count" { @@ -121,5 +121,5 @@ resource "datadog_monitor" "sql-database_deadlocks_count" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:sql-database", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:sql-database", "team:claranet", "created-by:terraform", "${var.deadlock_extra_tags}"] } diff --git a/cloud/azure/storage/README.md b/cloud/azure/storage/README.md index 637436c..a5fae11 100644 --- a/cloud/azure/storage/README.md +++ b/cloud/azure/storage/README.md @@ -30,18 +30,21 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| authorization_error_requests_extra_tags | Extra tags for Storage authorization errors monitor | list | `` | no | | authorization_error_requests_message | Custom message for Storage authorization errors monitor | string | `` | no | | authorization_error_requests_silenced | Groups to mute for Storage authorization errors monitor | map | `` | no | | authorization_error_requests_threshold_critical | Maximum acceptable percent of authorization error requests for a storage | string | `90` | no | | authorization_error_requests_threshold_warning | Warning regarding acceptable percent of authorization error requests for a storage | string | `50` | no | | authorization_error_requests_time_aggregator | Monitor aggregator for Storage authorization errors [available values: min, max or avg] | string | `min` | no | | authorization_error_requests_timeframe | Monitor timeframe for Storage authorization errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| availability_extra_tags | Extra tags for Storage availability monitor | list | `` | no | | availability_message | Custom message for Storage availability monitor | string | `` | no | | availability_silenced | Groups to mute for Storage availability monitor | map | `` | no | | availability_threshold_critical | Minimum acceptable percent of availability for a storage | string | `50` | no | | availability_threshold_warning | Warning regarding acceptable percent of availability for a storage | string | `90` | no | | availability_time_aggregator | Monitor aggregator for Storage availability [available values: min, max or avg] | string | `max` | no | | availability_timeframe | Monitor timeframe for Storage availability [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| client_other_error_requests_extra_tags | Extra tags for Storage other errors monitor | list | `` | no | | client_other_error_requests_message | Custom message for Storage other errors monitor | string | `` | no | | client_other_error_requests_silenced | Groups to mute for Storage other errors monitor | map | `` | no | | client_other_error_requests_threshold_critical | Maximum acceptable percent of client other error requests for a storage | string | `90` | no | @@ -52,6 +55,7 @@ Creates DataDog monitors with the following checks: | evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | +| latency_extra_tags | Extra tags for Storage latency monitor | list | `` | no | | latency_message | Custom message for Storage latency monitor | string | `` | no | | latency_silenced | Groups to mute for Storage latency monitor | map | `` | no | | latency_threshold_critical | Maximum acceptable end to end latency (ms) for a storage | string | `2000` | no | @@ -59,6 +63,7 @@ Creates DataDog monitors with the following checks: | latency_time_aggregator | Monitor aggregator for Storage latency [available values: min, max or avg] | string | `min` | no | | latency_timeframe | Monitor timeframe for Storage latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | message | Message sent when a Redis monitor is triggered | string | - | yes | +| network_error_requests_extra_tags | Extra tags for Storage network errors monitor | list | `` | no | | network_error_requests_message | Custom message for Storage network errors monitor | string | `` | no | | network_error_requests_silenced | Groups to mute for Storage network errors monitor | map | `` | no | | network_error_requests_threshold_critical | Maximum acceptable percent of network error requests for a storage | string | `90` | no | @@ -66,24 +71,28 @@ Creates DataDog monitors with the following checks: | network_error_requests_time_aggregator | Monitor aggregator for Storage network errors [available values: min, max or avg] | string | `min` | no | | network_error_requests_timeframe | Monitor timeframe for Storage network errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | new_host_delay | Delay in seconds before monitor new resource | string | `300` | no | +| server_other_error_requests_extra_tags | Extra tags for Storage server other errors monitor | list | `` | no | | server_other_error_requests_message | Custom message for Storage server other errors monitor | string | `` | no | | server_other_error_requests_silenced | Groups to mute for Storage server other errors monitor | map | `` | no | | server_other_error_requests_threshold_critical | Maximum acceptable percent of server other error requests for a storage | string | `90` | no | | server_other_error_requests_threshold_warning | Warning regarding acceptable percent of server other error requests for a storage | string | `50` | no | | server_other_error_requests_time_aggregator | Monitor aggregator for Storage other errors [available values: min, max or avg] | string | `min` | no | | server_other_error_requests_timeframe | Monitor timeframe for Storage server other errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| successful_requests_extra_tags | Extra tags for Storage sucessful requests monitor | list | `` | no | | successful_requests_message | Custom message for Storage sucessful requests monitor | string | `` | no | | successful_requests_silenced | Groups to mute for Storage sucessful requests monitor | map | `` | no | | successful_requests_threshold_critical | Minimum acceptable percent of successful requests for a storage | string | `10` | no | | successful_requests_threshold_warning | Warning regarding acceptable percent of successful requests for a storage | string | `30` | no | | successful_requests_time_aggregator | Monitor aggregator for Storage sucessful requests [available values: min, max or avg] | string | `max` | no | | successful_requests_timeframe | Monitor timeframe for Storage sucessful requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| throttling_error_requests_extra_tags | Extra tags for Storage throttling error monitor | list | `` | no | | throttling_error_requests_message | Custom message for Storage throttling error monitor | string | `` | no | | throttling_error_requests_silenced | Groups to mute for Storage throttling error monitor | map | `` | no | | throttling_error_requests_threshold_critical | Maximum acceptable percent of throttling error requests for a storage | string | `90` | no | | throttling_error_requests_threshold_warning | Warning regarding acceptable percent of throttling error requests for a storage | string | `50` | no | | throttling_error_requests_time_aggregator | Monitor aggregator for Storage throttling errors [available values: min, max or avg] | string | `min` | no | | throttling_error_requests_timeframe | Monitor timeframe for Storage throttling errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| timeout_error_requests_extra_tags | Extra tags for Storage timeout monitor | list | `` | no | | timeout_error_requests_message | Custom message for Storage timeout monitor | string | `` | no | | timeout_error_requests_silenced | Groups to mute for Storage timeout monitor | map | `` | no | | timeout_error_requests_threshold_critical | Maximum acceptable percent of timeout error requests for a storage | string | `90` | no | diff --git a/cloud/azure/storage/inputs.tf b/cloud/azure/storage/inputs.tf index 581618b..5c0e460 100644 --- a/cloud/azure/storage/inputs.tf +++ b/cloud/azure/storage/inputs.tf @@ -36,6 +36,12 @@ variable "availability_silenced" { default = {} } +variable "availability_extra_tags" { + description = "Extra tags for Storage availability monitor" + type = "list" + default = [] +} + variable "availability_message" { description = "Custom message for Storage availability monitor" type = "string" @@ -70,6 +76,12 @@ variable "successful_requests_silenced" { default = {} } +variable "successful_requests_extra_tags" { + description = "Extra tags for Storage sucessful requests monitor" + type = "list" + default = [] +} + variable "successful_requests_message" { description = "Custom message for Storage sucessful requests monitor" type = "string" @@ -104,6 +116,12 @@ variable "latency_silenced" { default = {} } +variable "latency_extra_tags" { + description = "Extra tags for Storage latency monitor" + type = "list" + default = [] +} + variable "latency_message" { description = "Custom message for Storage latency monitor" type = "string" @@ -138,6 +156,12 @@ variable "timeout_error_requests_silenced" { default = {} } +variable "timeout_error_requests_extra_tags" { + description = "Extra tags for Storage timeout monitor" + type = "list" + default = [] +} + variable "timeout_error_requests_message" { description = "Custom message for Storage timeout monitor" type = "string" @@ -172,6 +196,12 @@ variable "network_error_requests_silenced" { default = {} } +variable "network_error_requests_extra_tags" { + description = "Extra tags for Storage network errors monitor" + type = "list" + default = [] +} + variable "network_error_requests_message" { description = "Custom message for Storage network errors monitor" type = "string" @@ -206,6 +236,12 @@ variable "throttling_error_requests_silenced" { default = {} } +variable "throttling_error_requests_extra_tags" { + description = "Extra tags for Storage throttling error monitor" + type = "list" + default = [] +} + variable "throttling_error_requests_message" { description = "Custom message for Storage throttling error monitor" type = "string" @@ -240,6 +276,12 @@ variable "server_other_error_requests_silenced" { default = {} } +variable "server_other_error_requests_extra_tags" { + description = "Extra tags for Storage server other errors monitor" + type = "list" + default = [] +} + variable "server_other_error_requests_message" { description = "Custom message for Storage server other errors monitor" type = "string" @@ -274,6 +316,12 @@ variable "client_other_error_requests_silenced" { default = {} } +variable "client_other_error_requests_extra_tags" { + description = "Extra tags for Storage other errors monitor" + type = "list" + default = [] +} + variable "client_other_error_requests_message" { description = "Custom message for Storage other errors monitor" type = "string" @@ -308,6 +356,12 @@ variable "authorization_error_requests_silenced" { default = {} } +variable "authorization_error_requests_extra_tags" { + description = "Extra tags for Storage authorization errors monitor" + type = "list" + default = [] +} + variable "authorization_error_requests_message" { description = "Custom message for Storage authorization errors monitor" type = "string" diff --git a/cloud/azure/storage/monitors-azure-storage.tf b/cloud/azure/storage/monitors-azure-storage.tf index f235296..20a02c3 100644 --- a/cloud/azure/storage/monitors-azure-storage.tf +++ b/cloud/azure/storage/monitors-azure-storage.tf @@ -26,7 +26,7 @@ EOF evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.availability_extra_tags}"] } resource "datadog_monitor" "successful_requests" { @@ -57,7 +57,7 @@ EOF evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.successful_requests_extra_tags}"] } resource "datadog_monitor" "latency" { @@ -88,7 +88,7 @@ EOF evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.latency_extra_tags}"] } resource "datadog_monitor" "timeout_error_requests" { @@ -119,7 +119,7 @@ EOF evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.timeout_error_requests_extra_tags}"] } resource "datadog_monitor" "network_error_requests" { @@ -150,7 +150,7 @@ EOF evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.network_error_requests_extra_tags}"] } resource "datadog_monitor" "throttling_error_requests" { @@ -181,7 +181,7 @@ EOF evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.throttling_error_requests_extra_tags}"] } resource "datadog_monitor" "server_other_error_requests" { @@ -212,7 +212,7 @@ EOF evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.server_other_error_requests_extra_tags}"] } resource "datadog_monitor" "client_other_error_requests" { @@ -243,7 +243,7 @@ EOF evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.client_other_error_requests_extra_tags}"] } resource "datadog_monitor" "authorization_error_requests" { @@ -274,5 +274,5 @@ EOF evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:storage", "team:claranet", "created-by:terraform", "${var.authorization_error_requests_extra_tags}"] } diff --git a/cloud/azure/stream-analytics/README.md b/cloud/azure/stream-analytics/README.md index 0c1f5b8..c333bcc 100644 --- a/cloud/azure/stream-analytics/README.md +++ b/cloud/azure/stream-analytics/README.md @@ -26,6 +26,7 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| conversion_errors_extra_tags | Extra tags for Stream Analytics conversion errors monitor | list | `` | no | | conversion_errors_message | Custom message for Stream Analytics conversion errors monitor | string | `` | no | | conversion_errors_silenced | Groups to mute for Stream Analytics conversion errors monitor | map | `` | no | | conversion_errors_threshold_critical | Conversion errors limit (critical threshold) | string | `10` | no | @@ -34,6 +35,7 @@ Creates DataDog monitors with the following checks: | conversion_errors_timeframe | Monitor timeframe for Stream Analytics conversion errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | environment | Architecture environment | string | - | yes | | evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | +| failed_function_requests_extra_tags | Extra tags for Stream Analytics failed requests monitor | list | `` | no | | failed_function_requests_message | Custom message for Stream Analytics failed requests monitor | string | `` | no | | failed_function_requests_silenced | Groups to mute for Stream Analytics failed requests monitor | map | `` | no | | failed_function_requests_threshold_critical | Failed Function Request rate limit (critical threshold) | string | `10` | no | @@ -43,16 +45,19 @@ Creates DataDog monitors with the following checks: | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when a Redis monitor is triggered | string | - | yes | | new_host_delay | Delay in seconds before monitor new resource | string | `300` | no | +| runtime_errors_extra_tags | Extra tags for Stream Analytics runtime errors monitor | list | `` | no | | runtime_errors_message | Custom message for Stream Analytics runtime errors monitor | string | `` | no | | runtime_errors_silenced | Groups to mute for Stream Analytics runtime errors monitor | map | `` | no | | runtime_errors_threshold_critical | Runtime errors limit (critical threshold) | string | `10` | no | | runtime_errors_threshold_warning | Runtime errors limit (warning threshold) | string | `0` | no | | runtime_errors_time_aggregator | Monitor aggregator for Stream Analytics runtime errors [available values: min, max or avg] | string | `min` | no | | runtime_errors_timeframe | Monitor timeframe for Stream Analytics runtime errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| status_extra_tags | Extra tags for Stream Analytics status monitor | list | `` | no | | status_message | Custom message for Stream Analytics status monitor | string | `` | no | | status_silenced | Groups to mute for Stream Analytics status monitor | map | `` | no | | status_time_aggregator | Monitor aggregator for Stream Analytics status [available values: min, max or avg] | string | `max` | no | | status_timeframe | Monitor timeframe for Stream Analytics status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| su_utilization_extra_tags | Extra tags for Stream Analytics utilization monitor | list | `` | no | | su_utilization_message | Custom message for Stream Analytics utilization monitor | string | `` | no | | su_utilization_silenced | Groups to mute for Stream Analytics utilization monitor | map | `` | no | | su_utilization_threshold_critical | Streaming Unit utilization rate limit (critical threshold) | string | `80` | no | diff --git a/cloud/azure/stream-analytics/inputs.tf b/cloud/azure/stream-analytics/inputs.tf index afec7f0..d11a34d 100644 --- a/cloud/azure/stream-analytics/inputs.tf +++ b/cloud/azure/stream-analytics/inputs.tf @@ -36,6 +36,12 @@ variable "status_silenced" { default = {} } +variable "status_extra_tags" { + description = "Extra tags for Stream Analytics status monitor" + type = "list" + default = [] +} + variable "status_message" { description = "Custom message for Stream Analytics status monitor" type = "string" @@ -60,6 +66,12 @@ variable "su_utilization_silenced" { default = {} } +variable "su_utilization_extra_tags" { + description = "Extra tags for Stream Analytics utilization monitor" + type = "list" + default = [] +} + variable "su_utilization_message" { description = "Custom message for Stream Analytics utilization monitor" type = "string" @@ -94,6 +106,12 @@ variable "failed_function_requests_silenced" { default = {} } +variable "failed_function_requests_extra_tags" { + description = "Extra tags for Stream Analytics failed requests monitor" + type = "list" + default = [] +} + variable "failed_function_requests_message" { description = "Custom message for Stream Analytics failed requests monitor" type = "string" @@ -122,6 +140,12 @@ variable "conversion_errors_silenced" { default = {} } +variable "conversion_errors_extra_tags" { + description = "Extra tags for Stream Analytics conversion errors monitor" + type = "list" + default = [] +} + variable "conversion_errors_message" { description = "Custom message for Stream Analytics conversion errors monitor" type = "string" @@ -156,6 +180,12 @@ variable "runtime_errors_silenced" { default = {} } +variable "runtime_errors_extra_tags" { + description = "Extra tags for Stream Analytics runtime errors monitor" + type = "list" + default = [] +} + variable "runtime_errors_message" { description = "Custom message for Stream Analytics runtime errors monitor" type = "string" diff --git a/cloud/azure/stream-analytics/monitors-stream-analytics.tf b/cloud/azure/stream-analytics/monitors-stream-analytics.tf index b007bc5..00fa248 100644 --- a/cloud/azure/stream-analytics/monitors-stream-analytics.tf +++ b/cloud/azure/stream-analytics/monitors-stream-analytics.tf @@ -22,7 +22,7 @@ resource "datadog_monitor" "status" { require_full_window = false new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform", "${var.status_extra_tags}"] } resource "datadog_monitor" "su_utilization" { @@ -54,7 +54,7 @@ resource "datadog_monitor" "su_utilization" { silenced = "${var.su_utilization_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform", "${var.su_utilization_extra_tags}"] } resource "datadog_monitor" "failed_function_requests" { @@ -87,7 +87,7 @@ resource "datadog_monitor" "failed_function_requests" { silenced = "${var.failed_function_requests_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform", "${var.failed_function_requests_extra_tags}"] } resource "datadog_monitor" "conversion_errors" { @@ -119,7 +119,7 @@ resource "datadog_monitor" "conversion_errors" { silenced = "${var.conversion_errors_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform", "${var.conversion_errors_extra_tags}"] } resource "datadog_monitor" "runtime_errors" { @@ -151,5 +151,5 @@ resource "datadog_monitor" "runtime_errors" { silenced = "${var.runtime_errors_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform", "${var.runtime_errors_extra_tags}"] } diff --git a/database/mongodb/README.md b/database/mongodb/README.md index 5ec2783..9c8b6b7 100644 --- a/database/mongodb/README.md +++ b/database/mongodb/README.md @@ -34,14 +34,17 @@ Creates DataDog monitors with the following checks: | mongodb_lag_critical | Critical replication lag in s | string | `5` | no | | mongodb_lag_warning | Warn replication lag in s | string | `2` | no | | mongodb_primary_aggregator | Monitor aggregator for MongoDB primary state [available values: min, max] | string | `max` | no | +| mongodb_primary_extra_tags | Extra tags for MongoDB primary state monitor | list | `` | no | | mongodb_primary_message | Custom message for MongoDB primary monitor | string | `` | no | | mongodb_primary_silenced | Groups to mute for MongoDB primary state monitor | map | `` | no | | mongodb_primary_timeframe | Monitor timeframe for MongoDB wrong state for primary node [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_1m` | no | | mongodb_replication_aggregator | Monitor aggregator for MongoDB replication lag [available values: min, max, sum or avg] | string | `avg` | no | +| mongodb_replication_extra_tags | Extra tags for MongoDB replication lag monitor | list | `` | no | | mongodb_replication_message | Custom message for MongoDB replication monitor | string | `` | no | | mongodb_replication_silenced | Groups to mute for MongoDB replication lag monitor | map | `` | no | | mongodb_replication_timeframe | Monitor timeframe for MongoDB replication lag [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_1m` | no | | mongodb_secondary_aggregator | Monitor aggregator for MongoDB secondary state [available values: min, max] | string | `max` | no | +| mongodb_secondary_extra_tags | Extra tags for MongoDB secondary state monitor | list | `` | no | | mongodb_secondary_message | Custom message for MongoDB secondary monitor | string | `` | no | | mongodb_secondary_silenced | Groups to mute for MongoDB secondary state monitor | map | `` | no | | mongodb_secondary_timeframe | Monitor timeframe for MongoDB wrong state for secondaries nodes [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | diff --git a/database/mongodb/inputs.tf b/database/mongodb/inputs.tf index d85a967..e8d45e4 100644 --- a/database/mongodb/inputs.tf +++ b/database/mongodb/inputs.tf @@ -74,12 +74,24 @@ variable "mongodb_primary_silenced" { default = {} } +variable "mongodb_primary_extra_tags" { + description = "Extra tags for MongoDB primary state monitor" + type = "list" + default = [] +} + variable "mongodb_secondary_silenced" { description = "Groups to mute for MongoDB secondary state monitor" type = "map" default = {} } +variable "mongodb_secondary_extra_tags" { + description = "Extra tags for MongoDB secondary state monitor" + type = "list" + default = [] +} + variable "mongodb_server_count_silenced" { description = "Groups to mute for MongoDB server count monitor" type = "map" @@ -92,6 +104,12 @@ variable "mongodb_replication_silenced" { default = {} } +variable "mongodb_replication_extra_tags" { + description = "Extra tags for MongoDB replication lag monitor" + type = "list" + default = [] +} + variable "mongodb_primary_message" { description = "Custom message for MongoDB primary monitor" type = "string" diff --git a/database/mongodb/monitors-mongo.tf b/database/mongodb/monitors-mongo.tf index 4f307b1..e51394a 100644 --- a/database/mongodb/monitors-mongo.tf +++ b/database/mongodb/monitors-mongo.tf @@ -20,7 +20,7 @@ resource "datadog_monitor" "mongodb_primary" { silenced = "${var.mongodb_primary_silenced}" - tags = ["env:${var.environment}", "type:database", "provider:mongodb", "resource:mongodb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:database", "provider:mongodb", "resource:mongodb", "team:claranet", "created-by:terraform", "${var.mongodb_primary_extra_tags}"] } resource "datadog_monitor" "mongodb_secondary" { @@ -52,7 +52,7 @@ resource "datadog_monitor" "mongodb_secondary" { silenced = "${var.mongodb_secondary_silenced}" - tags = ["env:${var.environment}", "type:database", "provider:mongodb", "resource:mongodb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:database", "provider:mongodb", "resource:mongodb", "team:claranet", "created-by:terraform", "${var.mongodb_secondary_extra_tags}"] } resource "datadog_monitor" "mongodb_server_count" { @@ -83,7 +83,7 @@ resource "datadog_monitor" "mongodb_server_count" { silenced = "${var.mongodb_secondary_silenced}" - tags = ["env:${var.environment}", "type:database", "provider:mongodb", "resource:mongodb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:database", "provider:mongodb", "resource:mongodb", "team:claranet", "created-by:terraform", "${var.mongodb_secondary_extra_tags}"] } resource "datadog_monitor" "mongodb_replication" { @@ -113,5 +113,5 @@ resource "datadog_monitor" "mongodb_replication" { silenced = "${var.mongodb_replication_silenced}" - tags = ["env:${var.environment}", "type:database", "provider:mongodb", "resource:mongodb", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:database", "provider:mongodb", "resource:mongodb", "team:claranet", "created-by:terraform", "${var.mongodb_replication_extra_tags}"] } diff --git a/middleware/apache/README.md b/middleware/apache/README.md index 0718947..5889438 100644 --- a/middleware/apache/README.md +++ b/middleware/apache/README.md @@ -22,6 +22,7 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| apache_connect_extra_tags | Extra tags for Apache process monitor | list | `` | no | | apache_connect_message | Custom message for Apache status monitor | string | `` | no | | apache_connect_silenced | Groups to mute for Apache status monitor | map | `` | no | | apache_connect_threshold_critical | Apache status monitor (critical threshold) | string | `1.1754943508222875e-38` | no | diff --git a/middleware/apache/inputs.tf b/middleware/apache/inputs.tf index 176a509..7a158d5 100644 --- a/middleware/apache/inputs.tf +++ b/middleware/apache/inputs.tf @@ -37,6 +37,12 @@ variable "apache_connect_silenced" { default = {} } +variable "apache_connect_extra_tags" { + description = "Extra tags for Apache process monitor" + type = "list" + default = [] +} + variable "apache_connect_message" { description = "Custom message for Apache status monitor" type = "string" diff --git a/middleware/apache/monitors-apache.tf b/middleware/apache/monitors-apache.tf index 2f23c14..eab994d 100644 --- a/middleware/apache/monitors-apache.tf +++ b/middleware/apache/monitors-apache.tf @@ -24,5 +24,5 @@ resource "datadog_monitor" "datadog_apache_process" { silenced = "${var.apache_connect_silenced}" - tags = ["env:${var.environment}", "type:middleware", "provider:apache", "resource:apache", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:middleware", "provider:apache", "resource:apache", "team:claranet", "created-by:terraform", "${var.apache_connect_extra_tags}"] } diff --git a/middleware/nginx/README.md b/middleware/nginx/README.md index 180cf9a..8cb6bf2 100644 --- a/middleware/nginx/README.md +++ b/middleware/nginx/README.md @@ -28,6 +28,7 @@ Creates DataDog monitors with the following checks: | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when an alert is triggered | string | - | yes | | new_host_delay | Delay in seconds before monitor new resource | string | `300` | no | +| nginx_connect_extra_tags | Extra tags for Nginx process monitor | list | `` | no | | nginx_connect_message | Custom message for Nginx status monitor | string | `` | no | | nginx_connect_silenced | Groups to mute for Nginx status monitor | map | `` | no | | nginx_connect_threshold_critical | Nginx status monitor (critical threshold) | string | `1.1754943508222875e-38` | no | diff --git a/middleware/nginx/inputs.tf b/middleware/nginx/inputs.tf index 53ef9ce..9b900f8 100644 --- a/middleware/nginx/inputs.tf +++ b/middleware/nginx/inputs.tf @@ -37,6 +37,12 @@ variable "nginx_connect_silenced" { default = {} } +variable "nginx_connect_extra_tags" { + description = "Extra tags for Nginx process monitor" + type = "list" + default = [] +} + variable "nginx_connect_message" { description = "Custom message for Nginx status monitor" type = "string" diff --git a/middleware/nginx/monitors-nginx.tf b/middleware/nginx/monitors-nginx.tf index 6c200f0..136a1d5 100644 --- a/middleware/nginx/monitors-nginx.tf +++ b/middleware/nginx/monitors-nginx.tf @@ -24,5 +24,5 @@ resource "datadog_monitor" "datadog_nginx_process" { silenced = "${var.nginx_connect_silenced}" - tags = ["env:${var.environment}", "type:middleware", "provider:nginx", "resource:nginx", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:middleware", "provider:nginx", "resource:nginx", "team:claranet", "created-by:terraform", "${var.nginx_connect_extra_tags}"] } diff --git a/middleware/php-fpm/README.md b/middleware/php-fpm/README.md index 0603064..439c93d 100644 --- a/middleware/php-fpm/README.md +++ b/middleware/php-fpm/README.md @@ -29,12 +29,14 @@ Creates DataDog monitors with the following checks: | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when an alert is triggered | string | - | yes | | new_host_delay | Delay in seconds before monitor new resource | string | `300` | no | +| php_fpm_busy_extra_tags | Extra tags for PHP FPM busy worker monitor | list | `` | no | | php_fpm_busy_message | Custom message for PHP FPM busy worker monitor | string | `` | no | | php_fpm_busy_silenced | Groups to mute for PHP FPM busy worker monitor | map | `` | no | | php_fpm_busy_threshold_critical | php fpm busy critical threshold | string | `0.9` | no | | php_fpm_busy_threshold_warning | php fpm busy warning threshold | string | `0.8` | no | | php_fpm_busy_time_aggregator | Monitor aggregator for PHP FPM busy worker [available values: min, max or avg] | string | `avg` | no | | php_fpm_busy_timeframe | Monitor timeframe for PHP FPM busy worker [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_10m` | no | +| php_fpm_connect_extra_tags | Extra tags for PHP FPM process monitor | list | `` | no | | php_fpm_connect_message | Custom message for PHP FPM process monitor | string | `` | no | | php_fpm_connect_silenced | Groups to mute for PHP FPM process monitor | map | `` | no | diff --git a/middleware/php-fpm/inputs.tf b/middleware/php-fpm/inputs.tf index b198243..2c0d8e6 100644 --- a/middleware/php-fpm/inputs.tf +++ b/middleware/php-fpm/inputs.tf @@ -37,6 +37,12 @@ variable "php_fpm_busy_silenced" { default = {} } +variable "php_fpm_busy_extra_tags" { + description = "Extra tags for PHP FPM busy worker monitor" + type = "list" + default = [] +} + variable "php_fpm_busy_message" { description = "Custom message for PHP FPM busy worker monitor" type = "string" @@ -71,6 +77,12 @@ variable "php_fpm_connect_silenced" { default = {} } +variable "php_fpm_connect_extra_tags" { + description = "Extra tags for PHP FPM process monitor" + type = "list" + default = [] +} + variable "php_fpm_connect_message" { description = "Custom message for PHP FPM process monitor" type = "string" diff --git a/middleware/php-fpm/monitors-fpm.tf b/middleware/php-fpm/monitors-fpm.tf index 9ee5468..cc7ff6f 100644 --- a/middleware/php-fpm/monitors-fpm.tf +++ b/middleware/php-fpm/monitors-fpm.tf @@ -28,7 +28,7 @@ resource "datadog_monitor" "datadog_php_fpm_connect_idle" { silenced = "${var.php_fpm_busy_silenced}" - tags = ["env:${var.environment}", "type:middleware", "provider:php-fpm", "resource:php-fpm", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:middleware", "provider:php-fpm", "resource:php-fpm", "team:claranet", "created-by:terraform", "${var.php_fpm_busy_extra_tags}"] } resource "datadog_monitor" "datadog_fpm_process" { @@ -58,5 +58,5 @@ resource "datadog_monitor" "datadog_fpm_process" { silenced = "${var.php_fpm_connect_silenced}" - tags = ["env:${var.environment}", "type:middleware", "provider:php-fpm", "resource:php-fpm", "team:claranet", "created-by:terraform"] + tags = ["env:${var.environment}", "type:middleware", "provider:php-fpm", "resource:php-fpm", "team:claranet", "created-by:terraform", "${var.php_fpm_connect_extra_tags}"] } diff --git a/system/generic/README.md b/system/generic/README.md index 541bb45..150891a 100644 --- a/system/generic/README.md +++ b/system/generic/README.md @@ -26,12 +26,14 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| cpu_high_extra_tags | Extra tags for CPU high monitor | list | `` | no | | cpu_high_message | Custom message for CPU high monitor | string | `` | no | | cpu_high_silenced | Groups to mute for CPU high monitor | map | `` | no | | cpu_high_threshold_critical | CPU high critical threshold | string | `90` | no | | cpu_high_threshold_warning | CPU high warning threshold | string | `85` | no | | cpu_high_time_aggregator | Monitor aggregator for CPU high [available values: min, max or avg] | string | `min` | no | | cpu_high_timeframe | Monitor timeframe for CPU high [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_10m` | no | +| cpu_load_extra_tags | Extra tags for CPU load ratio monitor | list | `` | no | | cpu_load_message | Custom message for CPU load ratio monitor | string | `` | no | | cpu_load_silenced | Groups to mute for CPU load ratio monitor | map | `` | no | | cpu_load_threshold_critical | CPU load ratio critical threshold | string | `2.5` | no | @@ -42,18 +44,21 @@ Creates DataDog monitors with the following checks: | evaluation_delay | Delay in seconds for the metric evaluation | string | `15` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | +| free_disk_inodes_extra_tags | Extra tags for Free disk inodes monitor | list | `` | no | | free_disk_inodes_message | Custom message for Free disk inodes monitor | string | `` | no | | free_disk_inodes_silenced | Groups to mute for Free disk inodes monitor | map | `` | no | | free_disk_inodes_threshold_critical | Free disk space critical threshold | string | `5` | no | | free_disk_inodes_threshold_warning | Free disk space warning threshold | string | `10` | no | | free_disk_inodes_time_aggregator | Monitor aggregator for Free disk inodes [available values: min, max or avg] | string | `min` | no | | free_disk_inodes_timeframe | Monitor timeframe for Free disk inodes [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| free_disk_space_extra_tags | Extra tags for Free diskspace monitor | list | `` | no | | free_disk_space_message | Custom message for Free diskspace monitor | string | `` | no | | free_disk_space_silenced | Groups to mute for Free diskspace monitor | map | `` | no | | free_disk_space_threshold_critical | Free disk space critical threshold | string | `10` | no | | free_disk_space_threshold_warning | Free disk space warning threshold | string | `20` | no | | free_disk_space_time_aggregator | Monitor aggregator for Free diskspace [available values: min, max or avg] | string | `min` | no | | free_disk_space_timeframe | Monitor timeframe for Free diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| free_memory_extra_tags | Extra tags for Free memory monitor | list | `` | no | | free_memory_message | Custom message for Free memory monitor | string | - | yes | | free_memory_silenced | Groups to mute for Free memory monitor | map | `` | no | | free_memory_threshold_critical | Free disk space critical threshold | string | `5` | no | diff --git a/system/generic/inputs.tf b/system/generic/inputs.tf index 4a90e06..7405b07 100644 --- a/system/generic/inputs.tf +++ b/system/generic/inputs.tf @@ -37,6 +37,12 @@ variable "cpu_high_silenced" { default = {} } +variable "cpu_high_extra_tags" { + description = "Extra tags for CPU high monitor" + type = "list" + default = [] +} + variable "cpu_high_message" { description = "Custom message for CPU high monitor" type = "string" @@ -71,6 +77,12 @@ variable "cpu_load_silenced" { default = {} } +variable "cpu_load_extra_tags" { + description = "Extra tags for CPU load ratio monitor" + type = "list" + default = [] +} + variable "cpu_load_message" { description = "Custom message for CPU load ratio monitor" type = "string" @@ -105,6 +117,12 @@ variable "free_disk_space_silenced" { default = {} } +variable "free_disk_space_extra_tags" { + description = "Extra tags for Free diskspace monitor" + type = "list" + default = [] +} + variable "free_disk_space_message" { description = "Custom message for Free diskspace monitor" type = "string" @@ -139,6 +157,12 @@ variable "free_disk_inodes_silenced" { default = {} } +variable "free_disk_inodes_extra_tags" { + description = "Extra tags for Free disk inodes monitor" + type = "list" + default = [] +} + variable "free_disk_inodes_message" { description = "Custom message for Free disk inodes monitor" type = "string" @@ -173,6 +197,12 @@ variable "free_memory_silenced" { default = {} } +variable "free_memory_extra_tags" { + description = "Extra tags for Free memory monitor" + type = "list" + default = [] +} + variable "free_memory_message" { description = "Custom message for Free memory monitor" type = "string" diff --git a/system/generic/monitors-system.tf b/system/generic/monitors-system.tf index c648058..4d0374b 100644 --- a/system/generic/monitors-system.tf +++ b/system/generic/monitors-system.tf @@ -15,8 +15,6 @@ resource "datadog_monitor" "datadog_cpu_too_high" { critical = "${var.cpu_high_threshold_critical}" } - tags = ["env:${var.environment}", "type:system", "provider:system-check", "resource:generic", "team:claranet", "created-by:terraform"] - notify_no_data = true evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -27,6 +25,8 @@ resource "datadog_monitor" "datadog_cpu_too_high" { require_full_window = true silenced = "${var.cpu_high_silenced}" + + tags = ["env:${var.environment}", "type:system", "provider:system-check", "resource:generic", "team:claranet", "created-by:terraform", "${var.cpu_high_extra_tags}"] } resource "datadog_monitor" "datadog_load_too_high" { @@ -47,8 +47,6 @@ resource "datadog_monitor" "datadog_load_too_high" { critical = "${var.cpu_load_threshold_critical}" } - tags = ["env:${var.environment}", "type:system", "provider:system-core", "resource:generic", "team:claranet", "created-by:terraform"] - notify_no_data = true evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -59,6 +57,8 @@ resource "datadog_monitor" "datadog_load_too_high" { require_full_window = true silenced = "${var.cpu_load_silenced}" + + tags = ["env:${var.environment}", "type:system", "provider:system-core", "resource:generic", "team:claranet", "created-by:terraform", "${var.cpu_load_extra_tags}"] } resource "datadog_monitor" "datadog_free_disk_space_too_low" { @@ -79,8 +79,6 @@ resource "datadog_monitor" "datadog_free_disk_space_too_low" { critical = "${var.free_disk_space_threshold_critical}" } - tags = ["env:${var.environment}", "type:system", "provider:disk", "resource:generic", "team:claranet", "created-by:terraform"] - notify_no_data = true evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -91,6 +89,8 @@ resource "datadog_monitor" "datadog_free_disk_space_too_low" { require_full_window = true silenced = "${var.free_disk_space_silenced}" + + tags = ["env:${var.environment}", "type:system", "provider:disk", "resource:generic", "team:claranet", "created-by:terraform", "${var.free_disk_space_extra_tags}"] } resource "datadog_monitor" "datadog_free_disk_space_inodes_too_low" { @@ -111,8 +111,6 @@ resource "datadog_monitor" "datadog_free_disk_space_inodes_too_low" { critical = "${var.free_disk_inodes_threshold_critical}" } - tags = ["env:${var.environment}", "type:system", "provider:disk", "resource:generic", "team:claranet", "created-by:terraform"] - notify_no_data = true evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -123,6 +121,8 @@ resource "datadog_monitor" "datadog_free_disk_space_inodes_too_low" { require_full_window = true silenced = "${var.free_disk_inodes_silenced}" + + tags = ["env:${var.environment}", "type:system", "provider:disk", "resource:generic", "team:claranet", "created-by:terraform", "${var.free_disk_inodes_extra_tags}"] } resource "datadog_monitor" "datadog_free_memory" { @@ -143,8 +143,6 @@ resource "datadog_monitor" "datadog_free_memory" { critical = "${var.free_memory_threshold_critical}" } - tags = ["env:${var.environment}", "type:system", "provider:system-check", "resource:generic", "team:claranet", "created-by:terraform"] - notify_no_data = true evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -156,4 +154,6 @@ resource "datadog_monitor" "datadog_free_memory" { require_full_window = true silenced = "${var.free_memory_silenced}" + + tags = ["env:${var.environment}", "type:system", "provider:system-check", "resource:generic", "team:claranet", "created-by:terraform", "${var.free_memory_extra_tags}"] }