diff --git a/README.md b/README.md index faa5ba1..0aa27ee 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Before importing some modules, you must define the DataDog provider in your `mai ``` provider "datadog" { - version = "1.7.0" # if you use version before 1.0.4 you will have diff on monitor type + version = "2.0.2" api_key = "${var.datadog_api_key}" app_key = "${var.datadog_app_key}" diff --git a/caas/kubernetes/ark/README.md b/caas/kubernetes/ark/README.md index d7ec1d5..1950b0c 100644 --- a/caas/kubernetes/ark/README.md +++ b/caas/kubernetes/ark/README.md @@ -26,7 +26,6 @@ Creates DataDog monitors with the following checks: | ark\_schedules\_extra\_tags | Extra tags for Ark schedules monitor | list | `[]` | no | | ark\_schedules\_monitor\_message | Custom message for Ark schedules monitor | string | `""` | no | | ark\_schedules\_monitor\_no\_data\_timeframe | No data timeframe in minutes | string | `"1440"` | no | -| ark\_schedules\_monitor\_silenced | Groups to mute for Ark schedules monitor | map | `{}` | no | | ark\_schedules\_monitor\_timeframe | Monitor timeframe for Ark schedules monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_1d"` | no | | environment | Architecture environment | string | n/a | yes | | evaluation\_delay | Delay in seconds for the metric evaluation | string | `"15"` | no | diff --git a/caas/kubernetes/ark/inputs.tf b/caas/kubernetes/ark/inputs.tf index e390964..2e5d4cc 100644 --- a/caas/kubernetes/ark/inputs.tf +++ b/caas/kubernetes/ark/inputs.tf @@ -52,12 +52,6 @@ variable "ark_schedules_monitor_timeframe" { default = "last_1d" } -variable "ark_schedules_monitor_silenced" { - description = "Groups to mute for Ark schedules monitor" - type = "map" - default = {} -} - variable "ark_schedules_enabled" { description = "Flag to enable Ark schedules monitor" type = "string" diff --git a/caas/kubernetes/ark/monitors-ark.tf b/caas/kubernetes/ark/monitors-ark.tf index 38f30bd..5a502b2 100644 --- a/caas/kubernetes/ark/monitors-ark.tf +++ b/caas/kubernetes/ark/monitors-ark.tf @@ -1,7 +1,7 @@ resource "datadog_monitor" "ark_schedules_monitor" { count = "${var.ark_schedules_enabled == "true" ? 1 : 0}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Ark backup failed" - type = "metric alert" + type = "query alert" message = "${coalesce(var.ark_schedules_monitor_message, var.message)}" query = < ${var.ingress_5xx_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.ingress_5xx_threshold_warning}" @@ -27,8 +27,6 @@ resource "datadog_monitor" "nginx_ingress_too_many_5xx" { locked = false require_full_window = true - silenced = "${var.ingress_5xx_silenced}" - tags = ["env:${var.environment}", "type:caas", "provider:prometheus", "resource:nginx-ingress-controller", "team:claranet", "created-by:terraform", "${var.ingress_5xx_extra_tags}"] } @@ -44,7 +42,7 @@ resource "datadog_monitor" "nginx_ingress_too_many_4xx" { * 100, 0) > ${var.ingress_4xx_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.ingress_4xx_threshold_warning}" @@ -61,7 +59,5 @@ resource "datadog_monitor" "nginx_ingress_too_many_4xx" { locked = false require_full_window = true - silenced = "${var.ingress_4xx_silenced}" - tags = ["env:${var.environment}", "type:caas", "provider:prometheus", "resource:nginx-ingress-controller", "team:claranet", "created-by:terraform", "${var.ingress_4xx_extra_tags}"] } diff --git a/caas/kubernetes/node/README.md b/caas/kubernetes/node/README.md index 379135a..01e8d2a 100644 --- a/caas/kubernetes/node/README.md +++ b/caas/kubernetes/node/README.md @@ -34,12 +34,10 @@ Creates DataDog monitors with the following checks: | disk\_out\_enabled | Flag to enable Out of disk monitor | string | `"true"` | no | | disk\_out\_extra\_tags | Extra tags for Out of disk monitor | list | `[]` | no | | disk\_out\_message | Custom message for Out of disk monitor | string | `""` | no | -| disk\_out\_silenced | Groups to mute for Out of disk monitor | map | `{}` | no | | disk\_out\_threshold\_warning | Out of disk monitor (warning threshold) | string | `"3"` | no | | disk\_pressure\_enabled | Flag to enable Disk pressure monitor | string | `"true"` | no | | disk\_pressure\_extra\_tags | Extra tags for Disk pressure monitor | list | `[]` | no | | disk\_pressure\_message | Custom message for Disk pressure monitor | string | `""` | no | -| disk\_pressure\_silenced | Groups to mute for Disk pressure monitor | map | `{}` | no | | disk\_pressure\_threshold\_warning | Disk pressure monitor (warning threshold) | string | `"3"` | no | | environment | Architecture environment | string | n/a | yes | | evaluation\_delay | Delay in seconds for the metric evaluation | string | `"15"` | no | @@ -49,43 +47,36 @@ Creates DataDog monitors with the following checks: | kubelet\_ping\_enabled | Flag to enable Kubelet ping monitor | string | `"true"` | no | | kubelet\_ping\_extra\_tags | Extra tags for Kubelet ping monitor | list | `[]` | no | | kubelet\_ping\_message | Custom message for Kubelet ping monitor | string | `""` | no | -| kubelet\_ping\_silenced | Groups to mute for Kubelet ping monitor | map | `{}` | no | | kubelet\_ping\_threshold\_warning | Kubelet ping monitor (warning threshold) | string | `"3"` | no | | kubelet\_syncloop\_enabled | Flag to enable Kubelet sync loop monitor | string | `"true"` | no | | kubelet\_syncloop\_extra\_tags | Extra tags for Kubelet sync loop monitor | list | `[]` | no | | kubelet\_syncloop\_message | Custom message for Kubelet sync loop monitor | string | `""` | no | -| kubelet\_syncloop\_silenced | Groups to mute for Kubelet sync loop monitor | map | `{}` | no | | kubelet\_syncloop\_threshold\_warning | Kubelet sync loop monitor (warning threshold) | string | `"3"` | no | | memory\_pressure\_enabled | Flag to enable Memory pressure monitor | string | `"true"` | no | | memory\_pressure\_extra\_tags | Extra tags for Memory pressure monitor | list | `[]` | no | | memory\_pressure\_message | Custom message for Memory pressure monitor | string | `""` | no | -| memory\_pressure\_silenced | Groups to mute for Memory pressure monitor | map | `{}` | no | | memory\_pressure\_threshold\_warning | Memory pressure monitor (warning threshold) | string | `"3"` | no | | message | Message sent when a monitor is triggered | string | n/a | yes | | new\_host\_delay | Delay in seconds before monitor new resource | string | `"300"` | no | | node\_unschedulable\_enabled | Flag to enable node unschedulable monitor | string | `"true"` | no | | node\_unschedulable\_extra\_tags | Extra tags for node unschedulable monitor | list | `[]` | no | | node\_unschedulable\_message | Custom message for node unschedulable monitor | string | `""` | no | -| node\_unschedulable\_silenced | Groups to mute for node unschedulable monitor | map | `{}` | no | | node\_unschedulable\_time\_aggregator | Monitor aggregator for node unschedulable [available values: min, max or avg] | string | `"min"` | no | | node\_unschedulable\_timeframe | Monitor timeframe for node unschedulable [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_1h"` | no | | prefix\_slug | Prefix string to prepend between brackets on every monitors names | string | `""` | no | | ready\_enabled | Flag to enable Node ready monitor | string | `"true"` | no | | ready\_extra\_tags | Extra tags for Node ready monitor | list | `[]` | no | | ready\_message | Custom message for Node ready monitor | string | `""` | no | -| ready\_silenced | Groups to mute for Node ready monitor | map | `{}` | no | | ready\_threshold\_warning | Node ready monitor (warning threshold) | string | `"3"` | no | | unregister\_net\_device\_enabled | Flag to enable Unregister net device monitor | string | `"true"` | no | | unregister\_net\_device\_extra\_tags | Extra tags for Unregister net device monitor | list | `[]` | no | | unregister\_net\_device\_message | Custom message for Unregister net device monitor | string | `""` | no | -| unregister\_net\_device\_silenced | Groups to mute for Unregister net device monitor | map | `{}` | no | | unregister\_net\_device\_threshold\_critical | Unregister net device critical threshold | string | `"3"` | no | | unregister\_net\_device\_time\_aggregator | Monitor aggregator for Unregister net device [available values: min, max or avg] | string | `"min"` | no | | unregister\_net\_device\_timeframe | Monitor timeframe for Unregister net device [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"15m"` | no | | volume\_inodes\_enabled | Flag to enable Volume inodes monitor | string | `"true"` | no | | volume\_inodes\_extra\_tags | Extra tags for Volume inodes monitor | list | `[]` | no | | volume\_inodes\_message | Custom message for Volume inodes monitor | string | `""` | no | -| volume\_inodes\_silenced | Groups to mute for Volume inodes monitor | map | `{}` | no | | volume\_inodes\_threshold\_critical | Volume inodes critical threshold | string | `"95"` | no | | volume\_inodes\_threshold\_warning | Volume inodes warning threshold | string | `"90"` | no | | volume\_inodes\_time\_aggregator | Monitor aggregator for Volume inodes [available values: min, max or avg] | string | `"min"` | no | @@ -93,7 +84,6 @@ Creates DataDog monitors with the following checks: | volume\_space\_enabled | Flag to enable Volume space monitor | string | `"true"` | no | | volume\_space\_extra\_tags | Extra tags for Volume space monitor | list | `[]` | no | | volume\_space\_message | Custom message for Volume space monitor | string | `""` | no | -| volume\_space\_silenced | Groups to mute for Volume space monitor | map | `{}` | no | | volume\_space\_threshold\_critical | Volume space critical threshold | string | `"95"` | no | | volume\_space\_threshold\_warning | Volume space warning threshold | string | `"90"` | no | | volume\_space\_time\_aggregator | Monitor aggregator for Volume space [available values: min, max or avg] | string | `"min"` | no | diff --git a/caas/kubernetes/node/inputs.tf b/caas/kubernetes/node/inputs.tf index 6084ab8..02f8148 100644 --- a/caas/kubernetes/node/inputs.tf +++ b/caas/kubernetes/node/inputs.tf @@ -40,12 +40,6 @@ variable "prefix_slug" { # Datadog monitors variables -variable "disk_pressure_silenced" { - description = "Groups to mute for Disk pressure monitor" - type = "map" - default = {} -} - variable "disk_pressure_enabled" { description = "Flag to enable Disk pressure monitor" type = "string" @@ -70,12 +64,6 @@ variable "disk_pressure_threshold_warning" { default = 3 } -variable "disk_out_silenced" { - description = "Groups to mute for Out of disk monitor" - type = "map" - default = {} -} - variable "disk_out_enabled" { description = "Flag to enable Out of disk monitor" type = "string" @@ -100,12 +88,6 @@ variable "disk_out_threshold_warning" { default = 3 } -variable "memory_pressure_silenced" { - description = "Groups to mute for Memory pressure monitor" - type = "map" - default = {} -} - variable "memory_pressure_enabled" { description = "Flag to enable Memory pressure monitor" type = "string" @@ -130,12 +112,6 @@ variable "memory_pressure_threshold_warning" { default = 3 } -variable "ready_silenced" { - description = "Groups to mute for Node ready monitor" - type = "map" - default = {} -} - variable "ready_enabled" { description = "Flag to enable Node ready monitor" type = "string" @@ -160,12 +136,6 @@ variable "ready_threshold_warning" { default = 3 } -variable "kubelet_ping_silenced" { - description = "Groups to mute for Kubelet ping monitor" - type = "map" - default = {} -} - variable "kubelet_ping_enabled" { description = "Flag to enable Kubelet ping monitor" type = "string" @@ -190,12 +160,6 @@ variable "kubelet_ping_threshold_warning" { default = 3 } -variable "kubelet_syncloop_silenced" { - description = "Groups to mute for Kubelet sync loop monitor" - type = "map" - default = {} -} - variable "kubelet_syncloop_enabled" { description = "Flag to enable Kubelet sync loop monitor" type = "string" @@ -220,12 +184,6 @@ variable "kubelet_syncloop_threshold_warning" { default = 3 } -variable "unregister_net_device_silenced" { - description = "Groups to mute for Unregister net device monitor" - type = "map" - default = {} -} - variable "unregister_net_device_enabled" { description = "Flag to enable Unregister net device monitor" type = "string" @@ -261,12 +219,6 @@ variable "unregister_net_device_threshold_critical" { description = "Unregister net device critical threshold" } -variable "node_unschedulable_silenced" { - description = "Groups to mute for node unschedulable monitor" - type = "map" - default = {} -} - variable "node_unschedulable_enabled" { description = "Flag to enable node unschedulable monitor" type = "string" @@ -297,12 +249,6 @@ variable "node_unschedulable_timeframe" { default = "last_1h" } -variable "volume_space_silenced" { - description = "Groups to mute for Volume space monitor" - type = "map" - default = {} -} - variable "volume_space_enabled" { description = "Flag to enable Volume space monitor" type = "string" @@ -343,12 +289,6 @@ variable "volume_space_threshold_warning" { description = "Volume space warning threshold" } -variable "volume_inodes_silenced" { - description = "Groups to mute for Volume inodes monitor" - type = "map" - default = {} -} - variable "volume_inodes_enabled" { description = "Flag to enable Volume inodes monitor" type = "string" diff --git a/caas/kubernetes/node/monitors-k8s-node.tf b/caas/kubernetes/node/monitors-k8s-node.tf index 5db12c1..cca6ed1 100644 --- a/caas/kubernetes/node/monitors-k8s-node.tf +++ b/caas/kubernetes/node/monitors-k8s-node.tf @@ -23,8 +23,6 @@ resource "datadog_monitor" "disk_pressure" { locked = false require_full_window = true - silenced = "${var.disk_pressure_silenced}" - tags = ["env:${var.environment}", "type:caas", "provider:kubernetes", "resource:kubernetes-node", "team:claranet", "created-by:terraform", "${var.disk_pressure_extra_tags}"] } @@ -53,8 +51,6 @@ resource "datadog_monitor" "disk_out" { locked = false require_full_window = true - silenced = "${var.disk_out_silenced}" - tags = ["env:${var.environment}", "type:caas", "provider:kubernetes", "resource:kubernetes-node", "team:claranet", "created-by:terraform", "${var.disk_out_extra_tags}"] } @@ -83,8 +79,6 @@ resource "datadog_monitor" "memory_pressure" { locked = false require_full_window = true - silenced = "${var.memory_pressure_silenced}" - tags = ["env:${var.environment}", "type:caas", "provider:kubernetes", "resource:kubernetes-node", "team:claranet", "created-by:terraform", "${var.memory_pressure_extra_tags}"] } @@ -113,8 +107,6 @@ resource "datadog_monitor" "ready" { locked = false require_full_window = true - silenced = "${var.ready_silenced}" - tags = ["env:${var.environment}", "type:caas", "provider:kubernetes", "resource:kubernetes-node", "team:claranet", "created-by:terraform", "${var.ready_extra_tags}"] } @@ -143,8 +135,6 @@ resource "datadog_monitor" "kubelet_ping" { locked = false require_full_window = true - silenced = "${var.kubelet_ping_silenced}" - tags = ["env:${var.environment}", "type:caas", "provider:kubernetes", "resource:kubernetes-node", "team:claranet", "created-by:terraform", "${var.kubelet_ping_extra_tags}"] } @@ -173,8 +163,6 @@ resource "datadog_monitor" "kubelet_syncloop" { locked = false require_full_window = true - silenced = "${var.kubelet_syncloop_silenced}" - tags = ["env:${var.environment}", "type:caas", "provider:kubernetes", "resource:kubernetes-node", "team:claranet", "created-by:terraform", "${var.kubelet_syncloop_extra_tags}"] } @@ -197,8 +185,7 @@ resource "datadog_monitor" "unregister_net_device" { include_tags = true locked = false - silenced = "${var.unregister_net_device_silenced}" - tags = ["env:${var.environment}", "type:caas", "provider:kubernetes", "resource:kubernetes-node", "team:claranet", "created-by:terraform", "${var.unregister_net_device_extra_tags}"] + tags = ["env:${var.environment}", "type:caas", "provider:kubernetes", "resource:kubernetes-node", "team:claranet", "created-by:terraform", "${var.unregister_net_device_extra_tags}"] } resource "datadog_monitor" "node_unschedulable" { @@ -228,14 +215,13 @@ resource "datadog_monitor" "node_unschedulable" { locked = false require_full_window = true - silenced = "${var.node_unschedulable_silenced}" - tags = ["env:${var.environment}", "type:caas", "provider:kubernetes", "resource:kubernetes-node", "team:claranet", "created-by:terraform", "${var.node_unschedulable_extra_tags}"] + tags = ["env:${var.environment}", "type:caas", "provider:kubernetes", "resource:kubernetes-node", "team:claranet", "created-by:terraform", "${var.node_unschedulable_extra_tags}"] } resource "datadog_monitor" "volume_space" { count = "${var.volume_space_enabled == "true" ? 1 : 0}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Kubernetes Node volume space usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - type = "metric alert" + type = "query alert" message = "${coalesce(var.volume_space_message, var.message)}" query = < ${var.elb_4xx_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.elb_4xx_threshold_warning}" @@ -62,8 +60,6 @@ resource "datadog_monitor" "ELB_too_much_4xx" { require_full_window = false new_host_delay = "${var.new_host_delay}" - silenced = "${var.elb_4xx_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform", "${var.elb_4xx_extra_tags}"] } @@ -79,7 +75,7 @@ resource "datadog_monitor" "ELB_too_much_5xx" { * 100 > ${var.elb_5xx_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.elb_5xx_threshold_warning}" @@ -96,8 +92,6 @@ resource "datadog_monitor" "ELB_too_much_5xx" { require_full_window = false new_host_delay = "${var.new_host_delay}" - silenced = "${var.elb_5xx_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform", "${var.elb_5xx_extra_tags}"] } @@ -113,7 +107,7 @@ resource "datadog_monitor" "ELB_too_much_4xx_backend" { * 100 > ${var.elb_backend_4xx_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.elb_backend_4xx_threshold_warning}" @@ -130,8 +124,6 @@ resource "datadog_monitor" "ELB_too_much_4xx_backend" { require_full_window = false new_host_delay = "${var.new_host_delay}" - silenced = "${var.elb_backend_4xx_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform", "${var.elb_backend_4xx_extra_tags}"] } @@ -147,7 +139,7 @@ resource "datadog_monitor" "ELB_too_much_5xx_backend" { * 100 > ${var.elb_backend_5xx_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.elb_backend_5xx_threshold_warning}" @@ -164,8 +156,6 @@ resource "datadog_monitor" "ELB_too_much_5xx_backend" { require_full_window = false new_host_delay = "${var.new_host_delay}" - silenced = "${var.elb_backend_5xx_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elb", "team:claranet", "created-by:terraform", "${var.elb_backend_5xx_extra_tags}"] } @@ -180,7 +170,7 @@ resource "datadog_monitor" "ELB_backend_latency" { > ${var.elb_backend_latency_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.elb_backend_latency_warning}" @@ -197,7 +187,5 @@ resource "datadog_monitor" "ELB_backend_latency" { require_full_window = false new_host_delay = "${var.new_host_delay}" - silenced = "${var.elb_backend_latency_silenced}" - 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 de2b8d0..b8130ce 100644 --- a/cloud/aws/kinesis-firehose/README.md +++ b/cloud/aws/kinesis-firehose/README.md @@ -30,7 +30,6 @@ Creates DataDog monitors with the following checks: | incoming\_records\_enabled | Flag to enable Kinesis Firehorse incoming records monitor | 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 | | message | Message sent when an alert is triggered | string | n/a | yes | | new\_host\_delay | Delay in seconds before monitor new resource | string | `"300"` | no | diff --git a/cloud/aws/kinesis-firehose/inputs.tf b/cloud/aws/kinesis-firehose/inputs.tf index 65edf74..3e60557 100644 --- a/cloud/aws/kinesis-firehose/inputs.tf +++ b/cloud/aws/kinesis-firehose/inputs.tf @@ -41,12 +41,6 @@ variable "filter_tags_custom_excluded" { # Kinesis-Firehose -variable "incoming_records_silenced" { - description = "Groups to mute for Kinesis Firehorse incoming records monitor" - type = "map" - default = {} -} - variable "incoming_records_enabled" { description = "Flag to enable 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 28f10c6..633e22a 100644 --- a/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf +++ b/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf @@ -4,7 +4,7 @@ resource "datadog_monitor" "firehose_incoming_records" { name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Kinesis Firehose No incoming records" message = "${coalesce(var.incoming_records_message, var.message)}" - type = "metric alert" + type = "query alert" query = < ${var.cosmos_db_4xx_request_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.cosmos_db_4xx_request_rate_threshold_critical}" warning = "${var.cosmos_db_4xx_request_rate_threshold_warning}" } - silenced = "${var.cosmos_db_4xx_requests_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -90,15 +86,13 @@ resource "datadog_monitor" "cosmos_db_5xx_requests" { , 0) * 100 > ${var.cosmos_db_5xx_request_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.cosmos_db_5xx_request_rate_threshold_critical}" warning = "${var.cosmos_db_5xx_request_rate_threshold_warning}" } - silenced = "${var.cosmos_db_5xx_requests_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -126,15 +120,13 @@ resource "datadog_monitor" "cosmos_db_scaling" { , 0) * 100 > ${var.cosmos_db_scaling_error_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.cosmos_db_scaling_error_rate_threshold_critical}" warning = "${var.cosmos_db_scaling_error_rate_threshold_warning}" } - silenced = "${var.cosmos_db_scaling_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 diff --git a/cloud/azure/datalakestore/README.md b/cloud/azure/datalakestore/README.md index 9874f83..6f5883b 100644 --- a/cloud/azure/datalakestore/README.md +++ b/cloud/azure/datalakestore/README.md @@ -33,7 +33,6 @@ Creates DataDog monitors with the following checks: | status\_enabled | Flag to enable Datalake Store status monitor | string | `"true"` | no | | status\_extra\_tags | Extra tags for Datalake Store status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | list | `[]` | no | | status\_message | Custom message for Datalake Store status monitor | string | `""` | no | -| status\_silenced | Groups to mute for Datalake Store status monitor | map | `{}` | no | | status\_time\_aggregator | Monitor aggregator for Datalake Store status [available values: min, max or avg] | string | `"max"` | no | | status\_timeframe | Monitor timeframe for Datalake Store status [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/cloud/azure/datalakestore/inputs.tf b/cloud/azure/datalakestore/inputs.tf index 804fb14..21ed4f1 100644 --- a/cloud/azure/datalakestore/inputs.tf +++ b/cloud/azure/datalakestore/inputs.tf @@ -44,12 +44,6 @@ variable "status_enabled" { default = "true" } -variable "status_silenced" { - description = "Groups to mute for Datalake Store status monitor" - type = "map" - default = {} -} - variable "status_message" { description = "Custom message for Datalake Store status monitor" type = "string" diff --git a/cloud/azure/datalakestore/monitors-datalakestore.tf b/cloud/azure/datalakestore/monitors-datalakestore.tf index 697d526..edf703e 100644 --- a/cloud/azure/datalakestore/monitors-datalakestore.tf +++ b/cloud/azure/datalakestore/monitors-datalakestore.tf @@ -10,9 +10,7 @@ resource "datadog_monitor" "datalakestore_status" { ) < 1 EOQ - type = "metric alert" - - silenced = "${var.status_silenced}" + type = "query alert" notify_no_data = true evaluation_delay = "${var.evaluation_delay}" diff --git a/cloud/azure/eventgrid/README.md b/cloud/azure/eventgrid/README.md index d706dc5..08aa485 100644 --- a/cloud/azure/eventgrid/README.md +++ b/cloud/azure/eventgrid/README.md @@ -29,7 +29,6 @@ Creates DataDog monitors with the following checks: | failed\_messages\_rate\_enabled | Flag to enable Event Grid failed messages monitor | string | `"true"` | no | | failed\_messages\_rate\_extra\_tags | Extra tags for Event Grid failed messages monitor | list | `[]` | no | | failed\_messages\_rate\_message | Custom message for Event Grid failed messages monitor | string | `""` | no | -| failed\_messages\_rate\_silenced | Groups to mute for Event Grid failed messages monitor | map | `{}` | no | | failed\_messages\_rate\_thresold\_critical | Failed messages ratio (percentage) to trigger the critical alert | string | `"90"` | no | | failed\_messages\_rate\_thresold\_warning | Failed messages ratio (percentage) to trigger a warning alert | string | `"50"` | no | | failed\_messages\_rate\_time\_aggregator | Monitor aggregator for Event Grid failed messages [available values: min, max or avg] | string | `"min"` | no | @@ -42,14 +41,12 @@ Creates DataDog monitors with the following checks: | no\_successful\_message\_rate\_enabled | Flag to enable Event Grid no successful message monitor | string | `"true"` | no | | no\_successful\_message\_rate\_extra\_tags | Extra tags for Event Grid no successful message monitor | list | `[]` | no | | no\_successful\_message\_rate\_message | Custom message for Event Grid no successful message monitor | string | `""` | no | -| no\_successful\_message\_rate\_silenced | Groups to mute for²id no successful message monitor | map | `{}` | no | | no\_successful\_message\_rate\_time\_aggregator | Monitor aggregator for Event Grid no successful message [available values: min, max or avg] | string | `"min"` | no | | no\_successful\_message\_rate\_timeframe | Monitor timeframe for Event Grid no successful message [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | prefix\_slug | Prefix string to prepend between brackets on every monitors names | string | `""` | no | | unmatched\_events\_rate\_enabled | Flag to enable Event Grid unmatched events monitor | string | `"true"` | no | | unmatched\_events\_rate\_extra\_tags | Extra tags for Event Grid unmatched events monitor | list | `[]` | no | | unmatched\_events\_rate\_message | Custom message for Event Grid unmatched events monitor | string | `""` | no | -| unmatched\_events\_rate\_silenced | Groups to mute for Event Grid unmatched events monitor | map | `{}` | no | | unmatched\_events\_rate\_thresold\_critical | Unmatched events ratio (percentage) to trigger the critical alert | string | `"90"` | no | | unmatched\_events\_rate\_thresold\_warning | Unmatched events ratio (percentage) to trigger a warning alert | string | `"50"` | no | | unmatched\_events\_rate\_time\_aggregator | Monitor aggregator for Event Grid unmatched events [available values: min, max or avg] | string | `"min"` | no | diff --git a/cloud/azure/eventgrid/inputs.tf b/cloud/azure/eventgrid/inputs.tf index ecf9a5b..f700653 100644 --- a/cloud/azure/eventgrid/inputs.tf +++ b/cloud/azure/eventgrid/inputs.tf @@ -40,11 +40,6 @@ variable "filter_tags_custom_excluded" { } # Azure Event Grid specific variables -variable "no_successful_message_rate_silenced" { - description = "Groups to mute for²id no successful message monitor" - type = "map" - default = {} -} variable "no_successful_message_rate_enabled" { description = "Flag to enable Event Grid no successful message monitor" @@ -76,12 +71,6 @@ variable "no_successful_message_rate_timeframe" { default = "last_5m" } -variable "failed_messages_rate_silenced" { - description = "Groups to mute for Event Grid failed messages monitor" - type = "map" - default = {} -} - variable "failed_messages_rate_enabled" { description = "Flag to enable Event Grid failed messages monitor" type = "string" @@ -122,12 +111,6 @@ variable "failed_messages_rate_thresold_warning" { default = 50 } -variable "unmatched_events_rate_silenced" { - description = "Groups to mute for Event Grid unmatched events monitor" - type = "map" - default = {} -} - variable "unmatched_events_rate_enabled" { description = "Flag to enable Event Grid unmatched events monitor" type = "string" diff --git a/cloud/azure/eventgrid/monitors-eventgrid.tf b/cloud/azure/eventgrid/monitors-eventgrid.tf index d7e31ab..c0ef553 100644 --- a/cloud/azure/eventgrid/monitors-eventgrid.tf +++ b/cloud/azure/eventgrid/monitors-eventgrid.tf @@ -11,8 +11,6 @@ resource "datadog_monitor" "eventgrid_no_successful_message" { type = "metric alert" - silenced = "${var.no_successful_message_rate_silenced}" - notify_no_data = true evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -41,15 +39,13 @@ resource "datadog_monitor" "eventgrid_failed_messages" { ) > ${var.failed_messages_rate_thresold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.failed_messages_rate_thresold_critical}" warning = "${var.failed_messages_rate_thresold_warning}" } - silenced = "${var.failed_messages_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -78,15 +74,13 @@ resource "datadog_monitor" "eventgrid_unmatched_events" { ) > ${var.unmatched_events_rate_thresold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.unmatched_events_rate_thresold_critical}" warning = "${var.unmatched_events_rate_thresold_warning}" } - silenced = "${var.unmatched_events_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 diff --git a/cloud/azure/eventhub/README.md b/cloud/azure/eventhub/README.md index 8958aa2..bee96c1 100644 --- a/cloud/azure/eventhub/README.md +++ b/cloud/azure/eventhub/README.md @@ -28,7 +28,6 @@ Creates DataDog monitors with the following checks: | errors\_rate\_enabled | Flag to enable Event Hub errors monitor | string | `"true"` | no | | 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\_time\_aggregator | Monitor aggregator for Event Hub errors [available values: min, max or avg] | string | `"min"` | no | @@ -37,7 +36,6 @@ Creates DataDog monitors with the following checks: | failed\_requests\_rate\_enabled | Flag to enable Event Hub failed requests monitor | string | `"true"` | 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 | | failed\_requests\_rate\_thresold\_warning | Failed requests ratio (percentage) to trigger a warning alert | string | `"50"` | no | | failed\_requests\_rate\_time\_aggregator | Monitor aggregator for Event Hub failed requests [available values: min, max or avg] | string | `"min"` | no | @@ -51,7 +49,6 @@ Creates DataDog monitors with the following checks: | status\_enabled | Flag to enable Event Hub status monitor | string | `"true"` | 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 | | status\_timeframe | Monitor timeframe for Event 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 | diff --git a/cloud/azure/eventhub/inputs.tf b/cloud/azure/eventhub/inputs.tf index 5435ba2..ca54d2e 100644 --- a/cloud/azure/eventhub/inputs.tf +++ b/cloud/azure/eventhub/inputs.tf @@ -40,11 +40,6 @@ variable "filter_tags_custom_excluded" { } # Azure Event Hub specific variables -variable "status_silenced" { - description = "Groups to mute for Event Hub status monitor" - type = "map" - default = {} -} variable "status_enabled" { description = "Flag to enable Event Hub status monitor" @@ -76,12 +71,6 @@ variable "status_timeframe" { default = "last_5m" } -variable "failed_requests_rate_silenced" { - description = "Groups to mute for Event Hub failed requests monitor" - type = "map" - default = {} -} - variable "failed_requests_rate_enabled" { description = "Flag to enable Event Hub failed requests monitor" type = "string" @@ -122,12 +111,6 @@ variable "failed_requests_rate_thresold_warning" { default = 50 } -variable "errors_rate_silenced" { - description = "Groups to mute for Event Hub errors monitor" - type = "map" - default = {} -} - variable "errors_rate_enabled" { description = "Flag to enable Event Hub errors monitor" type = "string" diff --git a/cloud/azure/eventhub/monitors-eventhub.tf b/cloud/azure/eventhub/monitors-eventhub.tf index eba63f5..f79635b 100644 --- a/cloud/azure/eventhub/monitors-eventhub.tf +++ b/cloud/azure/eventhub/monitors-eventhub.tf @@ -9,9 +9,7 @@ resource "datadog_monitor" "eventhub_status" { ) != 1 EOQ - type = "metric alert" - - silenced = "${var.status_silenced}" + type = "query alert" notify_no_data = true evaluation_delay = "${var.evaluation_delay}" @@ -38,15 +36,13 @@ resource "datadog_monitor" "eventhub_failed_requests" { ) * 100 > ${var.failed_requests_rate_thresold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.failed_requests_rate_thresold_critical}" warning = "${var.failed_requests_rate_thresold_warning}" } - silenced = "${var.failed_requests_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -74,15 +70,13 @@ resource "datadog_monitor" "eventhub_errors" { ) * 100 > ${var.errors_rate_thresold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.errors_rate_thresold_critical}" warning = "${var.errors_rate_thresold_warning}" } - silenced = "${var.errors_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 diff --git a/cloud/azure/functions/README.md b/cloud/azure/functions/README.md index 42bbeec..b3a39b0 100644 --- a/cloud/azure/functions/README.md +++ b/cloud/azure/functions/README.md @@ -32,7 +32,6 @@ Creates DataDog monitors with the following checks: | high\_connections\_count\_enabled | Flag to enable Functions high connections count monitor | string | `"true"` | no | | high\_connections\_count\_extra\_tags | Extra tags for Functions high connections count monitor | list | `[]` | no | | high\_connections\_count\_message | Custom message for Functions high connections count monitor | string | `""` | no | -| high\_connections\_count\_silenced | Groups to mute for Functions high connections count monitor | map | `{}` | no | | high\_connections\_count\_threshold\_critical | Alerting threshold for Functions high connections count | string | `"590"` | no | | high\_connections\_count\_threshold\_warning | Warning threshold for Functions high connections count | string | `"550"` | no | | high\_connections\_count\_time\_aggregator | Monitor aggregator for Functions high connections count [available values: min, max or avg] | string | `"min"` | no | @@ -40,7 +39,6 @@ Creates DataDog monitors with the following checks: | high\_threads\_count\_enabled | Flag to enable Functions high threads count monitor | string | `"true"` | no | | high\_threads\_count\_extra\_tags | Extra tags for Functions high threads count monitor | list | `[]` | no | | high\_threads\_count\_message | Custom message for Functions high threads count monitor | string | `""` | no | -| high\_threads\_count\_silenced | Groups to mute for Functions high threads count monitor | map | `{}` | no | | high\_threads\_count\_threshold\_critical | Alerting threshold for Functions high threads count | string | `"510"` | no | | high\_threads\_count\_threshold\_warning | Warning threshold for Functions high threads count | string | `"490"` | no | | high\_threads\_count\_time\_aggregator | Monitor aggregator for Functions high threads count [available values: min, max or avg] | string | `"min"` | no | @@ -48,7 +46,6 @@ Creates DataDog monitors with the following checks: | http\_5xx\_errors\_rate\_enabled | Flag to enable Functions Http 5xx errors rate monitor | string | `"true"` | no | | http\_5xx\_errors\_rate\_extra\_tags | Extra tags for Functions Http 5xx errors rate monitor | list | `[]` | no | | http\_5xx\_errors\_rate\_message | Custom message for Functions Http 5xx errors rate monitor | string | `""` | no | -| http\_5xx\_errors\_rate\_silenced | Groups to mute for Functions Http 5xx errors rate monitor | map | `{}` | no | | http\_5xx\_errors\_rate\_threshold\_critical | Alerting threshold for Functions Http 5xx errors rate | string | `"20"` | no | | http\_5xx\_errors\_rate\_threshold\_warning | Warning threshold for Functions Http 5xx errors rate | string | `"10"` | no | | http\_5xx\_errors\_rate\_time\_aggregator | Monitor aggregator for Functions Http 5xx errors rate [available values: min, max or avg] | string | `"min"` | no | diff --git a/cloud/azure/functions/inputs.tf b/cloud/azure/functions/inputs.tf index d115f5f..d7497ff 100644 --- a/cloud/azure/functions/inputs.tf +++ b/cloud/azure/functions/inputs.tf @@ -38,11 +38,6 @@ variable "prefix_slug" { } # Azure Function App specific variables -variable "http_5xx_errors_rate_silenced" { - description = "Groups to mute for Functions Http 5xx errors rate monitor" - type = "map" - default = {} -} variable "http_5xx_errors_rate_enabled" { description = "Flag to enable Functions Http 5xx errors rate monitor" @@ -84,12 +79,6 @@ variable "http_5xx_errors_rate_threshold_warning" { description = "Warning threshold for Functions Http 5xx errors rate" } -variable "high_connections_count_silenced" { - description = "Groups to mute for Functions high connections count monitor" - type = "map" - default = {} -} - variable "high_connections_count_enabled" { description = "Flag to enable Functions high connections count monitor" type = "string" @@ -130,12 +119,6 @@ variable "high_connections_count_threshold_warning" { description = "Warning threshold for Functions high connections count" } -variable "high_threads_count_silenced" { - description = "Groups to mute for Functions high threads count monitor" - type = "map" - default = {} -} - variable "high_threads_count_enabled" { description = "Flag to enable Functions high threads count monitor" type = "string" diff --git a/cloud/azure/functions/monitors-functions.tf b/cloud/azure/functions/monitors-functions.tf index dcca646..1f946ac 100644 --- a/cloud/azure/functions/monitors-functions.tf +++ b/cloud/azure/functions/monitors-functions.tf @@ -1,7 +1,7 @@ resource "datadog_monitor" "function_http_5xx_errors_rate" { count = "${var.http_5xx_errors_rate_enabled == "true" ? 1 : 0}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Function App HTTP 5xx errors too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - type = "metric alert" + type = "query alert" message = "${coalesce(var.http_5xx_errors_rate_message, var.message)}" query = < ${var.failed_jobs_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.failed_jobs_rate_threshold_warning}" critical = "${var.failed_jobs_rate_threshold_critical}" } - silenced = "${var.failed_jobs_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -48,15 +46,13 @@ resource "datadog_monitor" "too_many_list_jobs_failed" { * 100, 0) > ${var.failed_listjobs_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.failed_listjobs_rate_threshold_warning}" critical = "${var.failed_listjobs_rate_threshold_critical}" } - silenced = "${var.failed_listjobs_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -84,15 +80,13 @@ resource "datadog_monitor" "too_many_query_jobs_failed" { * 100, 0) > ${var.failed_queryjobs_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.failed_queryjobs_rate_threshold_warning}" critical = "${var.failed_queryjobs_rate_threshold_critical}" } - silenced = "${var.failed_queryjobs_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -117,9 +111,7 @@ resource "datadog_monitor" "status" { ) < 1 EOQ - type = "metric alert" - - silenced = "${var.status_silenced}" + type = "query alert" notify_no_data = true evaluation_delay = "${var.evaluation_delay}" @@ -145,9 +137,7 @@ resource "datadog_monitor" "total_devices" { ) == 0 EOQ - type = "metric alert" - - silenced = "${var.total_devices_silenced}" + type = "query alert" notify_no_data = false evaluation_delay = "${var.evaluation_delay}" @@ -176,15 +166,13 @@ resource "datadog_monitor" "too_many_c2d_methods_failed" { * 100, 0) > ${var.failed_c2d_methods_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.failed_c2d_methods_rate_threshold_warning}" critical = "${var.failed_c2d_methods_rate_threshold_critical}" } - silenced = "${var.failed_c2d_methods_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -212,15 +200,13 @@ resource "datadog_monitor" "too_many_c2d_twin_read_failed" { * 100, 0) > ${var.failed_c2d_twin_read_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.failed_c2d_twin_read_rate_threshold_warning}" critical = "${var.failed_c2d_twin_read_rate_threshold_critical}" } - silenced = "${var.failed_c2d_twin_read_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -248,15 +234,13 @@ resource "datadog_monitor" "too_many_c2d_twin_update_failed" { * 100, 0) > ${var.failed_c2d_twin_update_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.failed_c2d_twin_update_rate_threshold_warning}" critical = "${var.failed_c2d_twin_update_rate_threshold_critical}" } - silenced = "${var.failed_c2d_twin_update_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -284,15 +268,13 @@ resource "datadog_monitor" "too_many_d2c_twin_read_failed" { * 100, 0) > ${var.failed_d2c_twin_read_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.failed_d2c_twin_read_rate_threshold_warning}" critical = "${var.failed_d2c_twin_read_rate_threshold_critical}" } - silenced = "${var.failed_d2c_twin_read_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -320,15 +302,13 @@ resource "datadog_monitor" "too_many_d2c_twin_update_failed" { * 100, 0) > ${var.failed_d2c_twin_update_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.failed_d2c_twin_update_rate_threshold_warning}" critical = "${var.failed_d2c_twin_update_rate_threshold_critical}" } - silenced = "${var.failed_d2c_twin_update_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -358,15 +338,13 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_dropped" { * 100, 0) > ${var.dropped_d2c_telemetry_egress_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.dropped_d2c_telemetry_egress_rate_threshold_warning}" critical = "${var.dropped_d2c_telemetry_egress_rate_threshold_critical}" } - silenced = "${var.dropped_d2c_telemetry_egress_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -396,15 +374,13 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_orphaned" { * 100, 0) > ${var.orphaned_d2c_telemetry_egress_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.orphaned_d2c_telemetry_egress_rate_threshold_warning}" critical = "${var.orphaned_d2c_telemetry_egress_rate_threshold_critical}" } - silenced = "${var.orphaned_d2c_telemetry_egress_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -434,15 +410,13 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_invalid" { * 100, 0) > ${var.invalid_d2c_telemetry_egress_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.invalid_d2c_telemetry_egress_rate_threshold_warning}" critical = "${var.invalid_d2c_telemetry_egress_rate_threshold_critical}" } - silenced = "${var.invalid_d2c_telemetry_egress_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -469,9 +443,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_ingress_nosent" { , 0) > 0 EOQ - type = "metric alert" - - silenced = "${var.too_many_d2c_telemetry_ingress_nosent_silenced}" + type = "query alert" notify_no_data = false evaluation_delay = "${var.evaluation_delay}" diff --git a/cloud/azure/keyvault/README.md b/cloud/azure/keyvault/README.md index 5467e88..9aa83a0 100644 --- a/cloud/azure/keyvault/README.md +++ b/cloud/azure/keyvault/README.md @@ -27,7 +27,6 @@ Creates DataDog monitors with the following checks: | api\_latency\_enabled | Flag to enable Key Vault API latency monitor | string | `"true"` | no | | api\_latency\_extra\_tags | Extra tags for Key Vault API latency monitor | list | `[]` | no | | api\_latency\_message | Custom message for Key Vault API latency monitor | string | `""` | no | -| api\_latency\_silenced | Groups to mute for Key Vault API latency monitor | map | `{}` | no | | api\_latency\_threshold\_critical | Critical threshold for Key Vault API latency rate | string | `"100"` | no | | api\_latency\_threshold\_warning | Warning threshold for Key Vault API latency rate | string | `"80"` | no | | api\_latency\_time\_aggregator | Monitor aggregator for Key Vault API latency [available values: min, max or avg] | string | `"min"` | no | @@ -35,7 +34,6 @@ Creates DataDog monitors with the following checks: | api\_result\_enabled | Flag to enable Key Vault API result monitor | string | `"true"` | no | | api\_result\_extra\_tags | Extra tags for Key Vault API result monitor | list | `[]` | no | | api\_result\_message | Custom message for Key Vault API result monitor | string | `""` | no | -| api\_result\_silenced | Groups to mute for Key Vault API result monitor | map | `{}` | no | | api\_result\_threshold\_critical | Critical threshold for Key Vault API result rate | string | `"10"` | no | | api\_result\_threshold\_warning | Warning threshold for Key Vault API result rate | string | `"30"` | no | | api\_result\_time\_aggregator | Monitor aggregator for Key Vault API result [available values: min, max or avg] | string | `"max"` | no | @@ -51,7 +49,6 @@ Creates DataDog monitors with the following checks: | status\_enabled | Flag to enable Key Vault status monitor | string | `"true"` | no | | status\_extra\_tags | Extra tags for Key Vault status monitor | list | `[]` | no | | status\_message | Custom message for Key Vault status monitor | string | `""` | no | -| status\_silenced | Groups to mute for Key Vault status monitor | map | `{}` | no | | status\_time\_aggregator | Monitor aggregator for Key Vault status [available values: min, max or avg] | string | `"max"` | no | | status\_timeframe | Monitor timeframe for Key Vault status [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/cloud/azure/keyvault/inputs.tf b/cloud/azure/keyvault/inputs.tf index 758060b..86775cf 100644 --- a/cloud/azure/keyvault/inputs.tf +++ b/cloud/azure/keyvault/inputs.tf @@ -44,12 +44,6 @@ variable "status_enabled" { default = "true" } -variable "status_silenced" { - description = "Groups to mute for Key Vault status monitor" - type = "map" - default = {} -} - variable "status_message" { description = "Custom message for Key Vault status monitor" type = "string" @@ -79,12 +73,6 @@ variable "api_result_enabled" { default = "true" } -variable "api_result_silenced" { - description = "Groups to mute for Key Vault API result monitor" - type = "map" - default = {} -} - variable "api_result_message" { description = "Custom message for Key Vault API result monitor" type = "string" @@ -124,12 +112,6 @@ variable "api_latency_enabled" { default = "true" } -variable "api_latency_silenced" { - description = "Groups to mute for Key Vault API latency monitor" - type = "map" - default = {} -} - variable "api_latency_message" { description = "Custom message for Key Vault API latency monitor" type = "string" diff --git a/cloud/azure/keyvault/monitors-keyvault.tf b/cloud/azure/keyvault/monitors-keyvault.tf index c39d88f..6005b71 100644 --- a/cloud/azure/keyvault/monitors-keyvault.tf +++ b/cloud/azure/keyvault/monitors-keyvault.tf @@ -10,9 +10,7 @@ resource "datadog_monitor" "keyvault_status" { ) < 1 EOQ - type = "metric alert" - - silenced = "${var.status_silenced}" + type = "query alert" notify_no_data = true evaluation_delay = "${var.evaluation_delay}" @@ -47,9 +45,7 @@ resource "datadog_monitor" "keyvault_api_result" { warning = "${var.api_result_threshold_warning}" } - type = "metric alert" - - silenced = "${var.api_result_silenced}" + type = "query alert" notify_no_data = false evaluation_delay = "${var.evaluation_delay}" @@ -83,8 +79,6 @@ resource "datadog_monitor" "keyvault_api_latency" { type = "metric alert" - silenced = "${var.api_latency_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 diff --git a/cloud/azure/load-balancer/README.md b/cloud/azure/load-balancer/README.md index 860978a..27cd5a1 100644 --- a/cloud/azure/load-balancer/README.md +++ b/cloud/azure/load-balancer/README.md @@ -33,7 +33,6 @@ Creates DataDog monitors with the following checks: | status\_enabled | Flag to enable Load Balancer status monitor | string | `"true"` | no | | status\_extra\_tags | Extra tags for Load Balancer status monitor | list | `[]` | no | | status\_message | Custom message for Load Balancer status monitor | string | `""` | no | -| status\_silenced | Groups to mute for Load Balancer status monitor | map | `{}` | no | | status\_time\_aggregator | Monitor aggregator for Load Balancer status [available values: min, max or avg] | string | `"max"` | no | | status\_timeframe | Monitor timeframe for Load Balancer status [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/cloud/azure/load-balancer/inputs.tf b/cloud/azure/load-balancer/inputs.tf index a7476fc..8e99ec8 100644 --- a/cloud/azure/load-balancer/inputs.tf +++ b/cloud/azure/load-balancer/inputs.tf @@ -44,12 +44,6 @@ variable "status_enabled" { default = "true" } -variable "status_silenced" { - description = "Groups to mute for Load Balancer status monitor" - type = "map" - default = {} -} - variable "status_message" { description = "Custom message for Load Balancer status monitor" type = "string" diff --git a/cloud/azure/load-balancer/monitors-load-balancer.tf b/cloud/azure/load-balancer/monitors-load-balancer.tf index 930b7ca..45ede58 100644 --- a/cloud/azure/load-balancer/monitors-load-balancer.tf +++ b/cloud/azure/load-balancer/monitors-load-balancer.tf @@ -10,9 +10,7 @@ resource "datadog_monitor" "loadbalancer_status" { ) < 1 EOQ - type = "metric alert" - - silenced = "${var.status_silenced}" + type = "query alert" notify_no_data = true evaluation_delay = "${var.evaluation_delay}" diff --git a/cloud/azure/mysql/README.md b/cloud/azure/mysql/README.md index 83caccd..65193f1 100644 --- a/cloud/azure/mysql/README.md +++ b/cloud/azure/mysql/README.md @@ -28,7 +28,6 @@ Creates DataDog monitors with the following checks: | cpu\_usage\_enabled | Flag to enable Mysql status monitor | string | `"true"` | no | | cpu\_usage\_extra\_tags | Extra tags for Mysql status monitor | list | `[]` | no | | cpu\_usage\_message | Custom message for Mysql CPU monitor | string | `""` | no | -| cpu\_usage\_silenced | Groups to mute for Mysql CPU monitor | map | `{}` | no | | cpu\_usage\_threshold\_critical | Mysql CPU usage in percent (critical threshold) | string | `"90"` | no | | cpu\_usage\_threshold\_warning | Mysql CPU usage in percent (warning threshold) | string | `"80"` | no | | cpu\_usage\_time\_aggregator | Monitor aggregator for Mysql CPU [available values: min, max or avg] | string | `"min"` | no | @@ -40,7 +39,6 @@ Creates DataDog monitors with the following checks: | free\_storage\_enabled | Flag to enable Mysql status monitor | string | `"true"` | no | | free\_storage\_extra\_tags | Extra tags for Mysql status monitor | list | `[]` | no | | free\_storage\_message | Custom message for Mysql Free Storage monitor | string | `""` | no | -| free\_storage\_silenced | Groups to mute for Mysql Free Storage monitor | map | `{}` | no | | free\_storage\_threshold\_critical | Mysql Free Storage remaining in percent (critical threshold) | string | `"10"` | no | | free\_storage\_threshold\_warning | Mysql Free Storage remaining in percent (warning threshold) | string | `"20"` | no | | free\_storage\_time\_aggregator | Monitor aggregator for Mysql Free Storage [available values: min, max or avg] | string | `"min"` | no | @@ -48,7 +46,6 @@ Creates DataDog monitors with the following checks: | io\_consumption\_enabled | Flag to enable Mysql status monitor | string | `"true"` | no | | io\_consumption\_extra\_tags | Extra tags for Mysql status monitor | list | `[]` | no | | io\_consumption\_message | Custom message for Mysql IO consumption monitor | string | `""` | no | -| io\_consumption\_silenced | Groups to mute for Mysql IO consumption monitor | map | `{}` | no | | io\_consumption\_threshold\_critical | Mysql IO consumption in percent (critical threshold) | string | `"90"` | no | | io\_consumption\_threshold\_warning | Mysql IO consumption in percent (warning threshold) | string | `"80"` | no | | io\_consumption\_time\_aggregator | Monitor aggregator for Mysql IO consumption [available values: min, max or avg] | string | `"min"` | no | @@ -56,7 +53,6 @@ Creates DataDog monitors with the following checks: | memory\_usage\_enabled | Flag to enable Mysql status monitor | string | `"true"` | no | | memory\_usage\_extra\_tags | Extra tags for Mysql status monitor | list | `[]` | no | | memory\_usage\_message | Custom message for Mysql memory monitor | string | `""` | no | -| memory\_usage\_silenced | Groups to mute for Mysql memory monitor | map | `{}` | no | | memory\_usage\_threshold\_critical | Mysql memory usage in percent (critical threshold) | string | `"90"` | no | | memory\_usage\_threshold\_warning | Mysql memory usage in percent (warning threshold) | string | `"80"` | no | | memory\_usage\_time\_aggregator | Monitor aggregator for Mysql memory [available values: min, max or avg] | string | `"min"` | no | diff --git a/cloud/azure/mysql/inputs.tf b/cloud/azure/mysql/inputs.tf index 9b07764..514c715 100644 --- a/cloud/azure/mysql/inputs.tf +++ b/cloud/azure/mysql/inputs.tf @@ -35,11 +35,6 @@ variable "filter_tags_custom" { } # Azure Databases for MySQL Servers specific variables -variable "cpu_usage_silenced" { - description = "Groups to mute for Mysql CPU monitor" - type = "map" - default = {} -} variable "cpu_usage_enabled" { description = "Flag to enable Mysql status monitor" @@ -81,12 +76,6 @@ variable "cpu_usage_threshold_critical" { default = "90" } -variable "free_storage_silenced" { - description = "Groups to mute for Mysql Free Storage monitor" - type = "map" - default = {} -} - variable "free_storage_enabled" { description = "Flag to enable Mysql status monitor" type = "string" @@ -127,12 +116,6 @@ variable "free_storage_threshold_critical" { default = "10" } -variable "io_consumption_silenced" { - description = "Groups to mute for Mysql IO consumption monitor" - type = "map" - default = {} -} - variable "io_consumption_enabled" { description = "Flag to enable Mysql status monitor" type = "string" @@ -173,12 +156,6 @@ variable "io_consumption_threshold_critical" { default = "90" } -variable "memory_usage_silenced" { - description = "Groups to mute for Mysql memory monitor" - type = "map" - default = {} -} - variable "memory_usage_enabled" { description = "Flag to enable Mysql status monitor" type = "string" diff --git a/cloud/azure/mysql/monitors-mysql.tf b/cloud/azure/mysql/monitors-mysql.tf index 50f88cd..9dd0910 100644 --- a/cloud/azure/mysql/monitors-mysql.tf +++ b/cloud/azure/mysql/monitors-mysql.tf @@ -9,15 +9,13 @@ resource "datadog_monitor" "mysql_cpu_usage" { ) > ${var.cpu_usage_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.cpu_usage_threshold_critical}" warning = "${var.cpu_usage_threshold_warning}" } - silenced = "${var.cpu_usage_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -42,15 +40,13 @@ resource "datadog_monitor" "mysql_free_storage" { ) < ${var.free_storage_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.free_storage_threshold_critical}" warning = "${var.free_storage_threshold_warning}" } - silenced = "${var.free_storage_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -75,15 +71,13 @@ resource "datadog_monitor" "mysql_io_consumption" { ) > ${var.io_consumption_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.io_consumption_threshold_critical}" warning = "${var.io_consumption_threshold_warning}" } - silenced = "${var.io_consumption_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -108,15 +102,13 @@ resource "datadog_monitor" "mysql_memory_usage" { ) > ${var.memory_usage_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.memory_usage_threshold_critical}" warning = "${var.memory_usage_threshold_warning}" } - silenced = "${var.memory_usage_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 diff --git a/cloud/azure/postgresql/README.md b/cloud/azure/postgresql/README.md index c5d8029..f52a20a 100644 --- a/cloud/azure/postgresql/README.md +++ b/cloud/azure/postgresql/README.md @@ -29,7 +29,6 @@ Creates DataDog monitors with the following checks: | cpu\_usage\_enabled | Flag to enable PostgreSQL status monitor | string | `"true"` | no | | cpu\_usage\_extra\_tags | Extra tags for PostgreSQL status monitor | list | `[]` | no | | cpu\_usage\_message | Custom message for PostgreSQL CPU monitor | string | `""` | no | -| cpu\_usage\_silenced | Groups to mute for PostgreSQL CPU monitor | map | `{}` | no | | cpu\_usage\_threshold\_critical | PostgreSQL CPU usage in percent (critical threshold) | string | `"90"` | no | | cpu\_usage\_threshold\_warning | PostgreSQL CPU usage in percent (warning threshold) | string | `"80"` | no | | cpu\_usage\_time\_aggregator | Monitor aggregator for PostgreSQL CPU [available values: min, max or avg] | string | `"min"` | no | @@ -41,7 +40,6 @@ Creates DataDog monitors with the following checks: | free\_storage\_enabled | Flag to enable PostgreSQL status monitor | string | `"true"` | no | | free\_storage\_extra\_tags | Extra tags for PostgreSQL status monitor | list | `[]` | no | | free\_storage\_message | Custom message for PostgreSQL Free Storage monitor | string | `""` | no | -| free\_storage\_silenced | Groups to mute for PostgreSQL Free Storage monitor | map | `{}` | no | | free\_storage\_threshold\_critical | PostgreSQL Free Storage remaining in percent (critical threshold) | string | `"10"` | no | | free\_storage\_threshold\_warning | PostgreSQL Free Storage remaining in percent (warning threshold) | string | `"20"` | no | | free\_storage\_time\_aggregator | Monitor aggregator for PostgreSQL Free Storage [available values: min, max or avg] | string | `"min"` | no | @@ -49,7 +47,6 @@ Creates DataDog monitors with the following checks: | io\_consumption\_enabled | Flag to enable PostgreSQL status monitor | string | `"true"` | no | | io\_consumption\_extra\_tags | Extra tags for PostgreSQL status monitor | list | `[]` | no | | io\_consumption\_message | Custom message for PostgreSQL IO consumption monitor | string | `""` | no | -| io\_consumption\_silenced | Groups to mute for PostgreSQL IO consumption monitor | map | `{}` | no | | io\_consumption\_threshold\_critical | PostgreSQL IO consumption in percent (critical threshold) | string | `"90"` | no | | io\_consumption\_threshold\_warning | PostgreSQL IO consumption in percent (warning threshold) | string | `"80"` | no | | io\_consumption\_time\_aggregator | Monitor aggregator for PostgreSQL IO consumption [available values: min, max or avg] | string | `"min"` | no | @@ -57,7 +54,6 @@ Creates DataDog monitors with the following checks: | memory\_usage\_enabled | Flag to enable PostgreSQL status monitor | string | `"true"` | no | | memory\_usage\_extra\_tags | Extra tags for PostgreSQL status monitor | list | `[]` | no | | memory\_usage\_message | Custom message for PostgreSQL memory monitor | string | `""` | no | -| memory\_usage\_silenced | Groups to mute for PostgreSQL memory monitor | map | `{}` | no | | memory\_usage\_threshold\_critical | PostgreSQL memory usage in percent (critical threshold) | string | `"90"` | no | | memory\_usage\_threshold\_warning | PostgreSQL memory usage in percent (warning threshold) | string | `"80"` | no | | memory\_usage\_time\_aggregator | Monitor aggregator for PostgreSQL memory [available values: min, max or avg] | string | `"min"` | no | @@ -67,7 +63,6 @@ Creates DataDog monitors with the following checks: | no\_connection\_enabled | Flag to enable PostgreSQL status monitor | string | `"true"` | no | | no\_connection\_extra\_tags | Extra tags for PostgreSQL status monitor | list | `[]` | no | | no\_connection\_message | Custom message for PostgreSQL no connection monitor | string | `""` | no | -| no\_connection\_silenced | Groups to mute for PostgreSQL no connection monitor | map | `{}` | no | | no\_connection\_time\_aggregator | Monitor aggregator for PostgreSQL no connection [available values: min, max or avg] | string | `"min"` | no | | no\_connection\_timeframe | Monitor timeframe for PostgreSQL no connection [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | prefix\_slug | Prefix string to prepend between brackets on every monitors names | string | `""` | no | diff --git a/cloud/azure/postgresql/inputs.tf b/cloud/azure/postgresql/inputs.tf index 2b530d5..137e1b2 100644 --- a/cloud/azure/postgresql/inputs.tf +++ b/cloud/azure/postgresql/inputs.tf @@ -35,11 +35,6 @@ variable "filter_tags_custom" { } # Azure Databases for PostgreSQL Servers specific variables -variable "cpu_usage_silenced" { - description = "Groups to mute for PostgreSQL CPU monitor" - type = "map" - default = {} -} variable "cpu_usage_enabled" { description = "Flag to enable PostgreSQL status monitor" @@ -81,12 +76,6 @@ variable "cpu_usage_threshold_critical" { default = "90" } -variable "no_connection_silenced" { - description = "Groups to mute for PostgreSQL no connection monitor" - type = "map" - default = {} -} - variable "no_connection_enabled" { description = "Flag to enable PostgreSQL status monitor" type = "string" @@ -117,12 +106,6 @@ variable "no_connection_timeframe" { default = "last_5m" } -variable "free_storage_silenced" { - description = "Groups to mute for PostgreSQL Free Storage monitor" - type = "map" - default = {} -} - variable "free_storage_enabled" { description = "Flag to enable PostgreSQL status monitor" type = "string" @@ -163,12 +146,6 @@ variable "free_storage_threshold_critical" { default = "10" } -variable "io_consumption_silenced" { - description = "Groups to mute for PostgreSQL IO consumption monitor" - type = "map" - default = {} -} - variable "io_consumption_enabled" { description = "Flag to enable PostgreSQL status monitor" type = "string" @@ -209,12 +186,6 @@ variable "io_consumption_threshold_critical" { default = "90" } -variable "memory_usage_silenced" { - description = "Groups to mute for PostgreSQL memory monitor" - type = "map" - default = {} -} - variable "memory_usage_enabled" { description = "Flag to enable PostgreSQL status monitor" type = "string" diff --git a/cloud/azure/postgresql/monitors-postegresql.tf b/cloud/azure/postgresql/monitors-postegresql.tf index b5eb8a1..679278f 100644 --- a/cloud/azure/postgresql/monitors-postegresql.tf +++ b/cloud/azure/postgresql/monitors-postegresql.tf @@ -9,15 +9,13 @@ resource "datadog_monitor" "postgresql_cpu_usage" { ) > ${var.cpu_usage_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.cpu_usage_threshold_critical}" warning = "${var.cpu_usage_threshold_warning}" } - silenced = "${var.cpu_usage_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -42,9 +40,7 @@ resource "datadog_monitor" "postgresql_no_connection" { ) < 1 EOQ - type = "metric alert" - - silenced = "${var.no_connection_silenced}" + type = "query alert" notify_no_data = true evaluation_delay = "${var.evaluation_delay}" @@ -70,15 +66,13 @@ resource "datadog_monitor" "postgresql_free_storage" { ) < ${var.free_storage_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.free_storage_threshold_critical}" warning = "${var.free_storage_threshold_warning}" } - silenced = "${var.free_storage_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -103,15 +97,13 @@ resource "datadog_monitor" "postgresql_io_consumption" { ) > ${var.io_consumption_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.io_consumption_threshold_critical}" warning = "${var.io_consumption_threshold_warning}" } - silenced = "${var.io_consumption_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -136,15 +128,13 @@ resource "datadog_monitor" "postgresql_memory_usage" { ) > ${var.memory_usage_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.memory_usage_threshold_critical}" warning = "${var.memory_usage_threshold_warning}" } - silenced = "${var.memory_usage_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 diff --git a/cloud/azure/redis/README.md b/cloud/azure/redis/README.md index bb8400d..a19fabe 100644 --- a/cloud/azure/redis/README.md +++ b/cloud/azure/redis/README.md @@ -30,7 +30,6 @@ Creates DataDog monitors with the following checks: | evictedkeys\_limit\_enabled | Flag to enable Redis evicted keys monitor | string | `"true"` | 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 | | evictedkeys\_limit\_threshold\_warning | Evicted keys limit (warning threshold) | string | `"0"` | no | | evictedkeys\_limit\_time\_aggregator | Monitor aggregator for Redis evicted keys [available values: min, max or avg] | string | `"avg"` | no | @@ -43,7 +42,6 @@ Creates DataDog monitors with the following checks: | percent\_processor\_time\_enabled | Flag to enable Redis processor monitor | string | `"true"` | 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 | @@ -52,7 +50,6 @@ Creates DataDog monitors with the following checks: | server\_load\_rate\_enabled | Flag to enable Redis server load monitor | string | `"true"` | 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 | @@ -60,7 +57,6 @@ Creates DataDog monitors with the following checks: | status\_enabled | Flag to enable Redis status monitor | string | `"true"` | 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 | | status\_timeframe | Monitor timeframe for Redis status [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/cloud/azure/redis/inputs.tf b/cloud/azure/redis/inputs.tf index 473b815..7737430 100644 --- a/cloud/azure/redis/inputs.tf +++ b/cloud/azure/redis/inputs.tf @@ -40,11 +40,6 @@ variable "filter_tags_custom_excluded" { } # Azure Redis specific variables -variable "status_silenced" { - description = "Groups to mute for Redis status monitor" - type = "map" - default = {} -} variable "status_enabled" { description = "Flag to enable Redis status monitor" @@ -76,12 +71,6 @@ variable "status_timeframe" { default = "last_5m" } -variable "evictedkeys_limit_silenced" { - description = "Groups to mute for Redis evicted keys monitor" - type = "map" - default = {} -} - variable "evictedkeys_limit_enabled" { description = "Flag to enable Redis evicted keys monitor" type = "string" @@ -122,12 +111,6 @@ variable "evictedkeys_limit_threshold_critical" { default = 100 } -variable "percent_processor_time_silenced" { - description = "Groups to mute for Redis processor monitor" - type = "map" - default = {} -} - variable "percent_processor_time_enabled" { description = "Flag to enable Redis processor monitor" type = "string" @@ -168,12 +151,6 @@ variable "percent_processor_time_threshold_warning" { default = 60 } -variable "server_load_rate_silenced" { - description = "Groups to mute for Redis server load monitor" - type = "map" - default = {} -} - variable "server_load_rate_enabled" { description = "Flag to enable 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 42d07f9..fd38fc2 100644 --- a/cloud/azure/redis/monitors-azure-redis.tf +++ b/cloud/azure/redis/monitors-azure-redis.tf @@ -9,9 +9,7 @@ resource "datadog_monitor" "status" { ) != 1 EOQ - type = "metric alert" - - silenced = "${var.status_silenced}" + type = "query alert" notify_no_data = true evaluation_delay = "${var.evaluation_delay}" @@ -37,15 +35,13 @@ resource "datadog_monitor" "evictedkeys" { ) > ${var.evictedkeys_limit_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.evictedkeys_limit_threshold_warning}" critical = "${var.evictedkeys_limit_threshold_critical}" } - silenced = "${var.evictedkeys_limit_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -70,15 +66,13 @@ resource "datadog_monitor" "percent_processor_time" { ) > ${var.percent_processor_time_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.percent_processor_time_threshold_warning}" critical = "${var.percent_processor_time_threshold_critical}" } - silenced = "${var.percent_processor_time_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -103,15 +97,13 @@ resource "datadog_monitor" "server_load" { ) > ${var.server_load_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.server_load_rate_threshold_warning}" critical = "${var.server_load_rate_threshold_critical}" } - silenced = "${var.server_load_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 diff --git a/cloud/azure/serverfarms/README.md b/cloud/azure/serverfarms/README.md index 150d04e..0f68f6f 100644 --- a/cloud/azure/serverfarms/README.md +++ b/cloud/azure/serverfarms/README.md @@ -27,7 +27,6 @@ Creates DataDog monitors with the following checks: | cpu\_percentage\_enabled | Flag to enable the serverfarms cpu_percentage monitor | string | `"true"` | no | | cpu\_percentage\_extra\_tags | Extra tags for serverfarms cpu_percentage monitor | list | `[]` | no | | cpu\_percentage\_message | Custom message for serverfarm cpu_percentage monitor | string | `""` | no | -| cpu\_percentage\_silenced | Groups to mute for serverfarm cpu_percentage monitor | map | `{}` | no | | cpu\_percentage\_threshold\_critical | CPU percentage (critical threshold) | string | `"95"` | no | | cpu\_percentage\_threshold\_warning | CPU percentage (warning threshold) | string | `"90"` | no | | cpu\_percentage\_time\_aggregator | Monitor aggregator for serverfarms cpu_percentage [available values: min, max or avg] | string | `"min"` | no | @@ -39,7 +38,6 @@ Creates DataDog monitors with the following checks: | memory\_percentage\_enabled | Flag to enable the serverfarms memory_percentage monitor | string | `"true"` | no | | memory\_percentage\_extra\_tags | Extra tags for serverfarms memory_percentage monitor | list | `[]` | no | | memory\_percentage\_message | Custom message for serverfarm memory_percentage monitor | string | `""` | no | -| memory\_percentage\_silenced | Groups to mute for serverfarm memory_percentage monitor | map | `{}` | no | | memory\_percentage\_threshold\_critical | Memory percentage (critical threshold) | string | `"95"` | no | | memory\_percentage\_threshold\_warning | Memory percentage (warning threshold) | string | `"90"` | no | | memory\_percentage\_time\_aggregator | Monitor aggregator for serverfarms memory_percentage [available values: min, max or avg] | string | `"min"` | no | @@ -50,7 +48,6 @@ Creates DataDog monitors with the following checks: | status\_enabled | Flag to enable the serverfarms status monitor | string | `"true"` | no | | status\_extra\_tags | Extra tags for serverfarms status monitor | list | `[]` | no | | status\_message | Custom message for serverfarm status monitor | string | `""` | no | -| status\_silenced | Groups to mute for serverfarm status monitor | map | `{}` | no | | status\_time\_aggregator | Monitor aggregator for serverfarms status [available values: min, max or avg] | string | `"min"` | no | | status\_timeframe | Monitor timeframe for serverfarms status [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/cloud/azure/serverfarms/inputs.tf b/cloud/azure/serverfarms/inputs.tf index c9f6391..a3f5962 100644 --- a/cloud/azure/serverfarms/inputs.tf +++ b/cloud/azure/serverfarms/inputs.tf @@ -49,12 +49,6 @@ variable "status_message" { default = "" } -variable "status_silenced" { - type = "map" - description = "Groups to mute for serverfarm status monitor" - default = {} -} - variable "status_extra_tags" { description = "Extra tags for serverfarms status monitor" type = "list" @@ -86,12 +80,6 @@ variable "cpu_percentage_message" { default = "" } -variable "cpu_percentage_silenced" { - type = "map" - description = "Groups to mute for serverfarm cpu_percentage monitor" - default = {} -} - variable "cpu_percentage_extra_tags" { description = "Extra tags for serverfarms cpu_percentage monitor" type = "list" @@ -133,12 +121,6 @@ variable "memory_percentage_message" { default = "" } -variable "memory_percentage_silenced" { - type = "map" - description = "Groups to mute for serverfarm memory_percentage monitor" - default = {} -} - variable "memory_percentage_extra_tags" { description = "Extra tags for serverfarms memory_percentage monitor" type = "list" diff --git a/cloud/azure/serverfarms/monitors-azure-serverfarms.tf b/cloud/azure/serverfarms/monitors-azure-serverfarms.tf index 99c477a..1dccf59 100644 --- a/cloud/azure/serverfarms/monitors-azure-serverfarms.tf +++ b/cloud/azure/serverfarms/monitors-azure-serverfarms.tf @@ -9,9 +9,7 @@ resource "datadog_monitor" "status" { ) != 1 EOQ - type = "metric alert" - - silenced = "${var.status_silenced}" + type = "query alert" notify_no_data = true evaluation_delay = "${var.evaluation_delay}" @@ -37,15 +35,13 @@ resource "datadog_monitor" "cpu_percentage" { ) > ${var.cpu_percentage_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.cpu_percentage_threshold_warning}" critical = "${var.cpu_percentage_threshold_critical}" } - silenced = "${var.cpu_percentage_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -70,15 +66,13 @@ resource "datadog_monitor" "memory_percentage" { ) > ${var.memory_percentage_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.memory_percentage_threshold_warning}" critical = "${var.memory_percentage_threshold_critical}" } - silenced = "${var.memory_percentage_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 diff --git a/cloud/azure/servicebus/README.md b/cloud/azure/servicebus/README.md index 9118036..7e754f0 100644 --- a/cloud/azure/servicebus/README.md +++ b/cloud/azure/servicebus/README.md @@ -34,13 +34,11 @@ Creates DataDog monitors with the following checks: | new\_host\_delay | Delay in seconds before monitor new resource | string | `"300"` | no | | no\_active\_connections\_enabled | Flag to enable Service Bus status monitor | string | `"true"` | no | | no\_active\_connections\_message | Custom message for Service Bus status monitor | string | `""` | no | -| no\_active\_connections\_silenced | Groups to mute for Service Bus status monitor | map | `{}` | no | | no\_active\_connections\_time\_aggregator | Monitor aggregator for Service Bus status [available values: min, max or avg] | string | `"max"` | no | | no\_active\_connections\_timeframe | Monitor timeframe for Service Bus status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | prefix\_slug | Prefix string to prepend between brackets on every monitors names | string | `""` | no | | server\_errors\_enabled | Flag to enable Service Bus server errors monitor | string | `"true"` | no | | server\_errors\_message | Custom message for Service Bus server errors monitor | string | `""` | no | -| server\_errors\_silenced | Groups to mute for Service Bus server errors monitor | map | `{}` | no | | server\_errors\_threshold\_critical | Critical threshold for Service Bus server errors monitor | string | `"90"` | no | | server\_errors\_threshold\_warning | Warning threshold for Service Bus server errors monitor | string | `"50"` | no | | server\_errors\_time\_aggregator | Monitor aggregator for Service Bus server errors [available values: min, max or avg] | string | `"min"` | no | @@ -48,12 +46,10 @@ Creates DataDog monitors with the following checks: | status\_enabled | Flag to enable Service Bus status monitor | string | `"true"` | 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 | | status\_timeframe | Monitor timeframe for Service Bus status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | user\_errors\_enabled | Flag to enable Service Bus user errors monitor | string | `"true"` | no | | user\_errors\_message | Custom message for Service Bus user errors monitor | string | `""` | no | -| user\_errors\_silenced | Groups to mute for Service Bus user errors monitor | map | `{}` | no | | user\_errors\_threshold\_critical | Critical threshold for Service Bus user errors monitor | string | `"90"` | no | | user\_errors\_threshold\_warning | Warning threshold for Service Bus user errors monitor | string | `"50"` | no | | user\_errors\_time\_aggregator | Monitor aggregator for Service Bus user errors [available values: min, max or avg] | string | `"min"` | no | diff --git a/cloud/azure/servicebus/inputs.tf b/cloud/azure/servicebus/inputs.tf index 5aaf55c..6b69823 100644 --- a/cloud/azure/servicebus/inputs.tf +++ b/cloud/azure/servicebus/inputs.tf @@ -46,12 +46,6 @@ variable "status_enabled" { default = "true" } -variable "status_silenced" { - description = "Groups to mute for Service Bus status monitor" - type = "map" - default = {} -} - variable "status_extra_tags" { description = "Extra tags for Service Bus status monitor" type = "list" @@ -81,12 +75,6 @@ variable "no_active_connections_enabled" { default = "true" } -variable "no_active_connections_silenced" { - description = "Groups to mute for Service Bus status monitor" - type = "map" - default = {} -} - variable "no_active_connections_message" { description = "Custom message for Service Bus status monitor" type = "string" @@ -117,12 +105,6 @@ variable "server_errors_enabled" { default = "true" } -variable "server_errors_silenced" { - description = "Groups to mute for Service Bus server errors monitor" - type = "map" - default = {} -} - variable "server_errors_time_aggregator" { description = "Monitor aggregator for Service Bus server errors [available values: min, max or avg]" type = "string" @@ -157,12 +139,6 @@ variable "user_errors_enabled" { default = "true" } -variable "user_errors_silenced" { - description = "Groups to mute for Service Bus user errors monitor" - type = "map" - default = {} -} - variable "user_errors_time_aggregator" { description = "Monitor aggregator for Service Bus user errors [available values: min, max or avg]" type = "string" diff --git a/cloud/azure/servicebus/monitors-service-bus.tf b/cloud/azure/servicebus/monitors-service-bus.tf index e59cbce..ccad349 100644 --- a/cloud/azure/servicebus/monitors-service-bus.tf +++ b/cloud/azure/servicebus/monitors-service-bus.tf @@ -10,9 +10,7 @@ resource "datadog_monitor" "servicebus_status" { ) != 1 EOQ - type = "metric alert" - - silenced = "${var.status_silenced}" + type = "query alert" notify_no_data = true evaluation_delay = "${var.evaluation_delay}" @@ -39,9 +37,7 @@ resource "datadog_monitor" "service_bus_no_active_connections" { ) < 1 EOQ - type = "metric alert" - - silenced = "${var.no_active_connections_silenced}" + type = "query alert" notify_no_data = false evaluation_delay = "${var.evaluation_delay}" @@ -69,15 +65,13 @@ resource "datadog_monitor" "service_bus_user_errors" { ) * 100 > ${var.user_errors_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.user_errors_threshold_critical}" warning = "${var.user_errors_threshold_warning}" } - silenced = "${var.user_errors_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -104,15 +98,13 @@ resource "datadog_monitor" "service_bus_server_errors" { ) * 100 > ${var.server_errors_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.server_errors_threshold_critical}" warning = "${var.server_errors_threshold_warning}" } - silenced = "${var.server_errors_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 diff --git a/cloud/azure/sql-database/README.md b/cloud/azure/sql-database/README.md index ad8edf1..ff2a933 100644 --- a/cloud/azure/sql-database/README.md +++ b/cloud/azure/sql-database/README.md @@ -29,7 +29,6 @@ Creates DataDog monitors with the following checks: | cpu\_enabled | Flag to enable SQL CPU monitor | string | `"true"` | no | | 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 | @@ -37,13 +36,11 @@ Creates DataDog monitors with the following checks: | deadlock\_enabled | Flag to enable SQL Deadlock monitor | string | `"true"` | 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\_enabled | Flag to enable SQL disk space monitor | string | `"true"` | 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 | @@ -51,7 +48,6 @@ Creates DataDog monitors with the following checks: | dtu\_enabled | Flag to enable SQL DTU monitor | string | `"true"` | 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 | | dtu\_threshold\_warning | Amount of DTU used (warning threshold) | string | `"85"` | no | | dtu\_time\_aggregator | Monitor aggregator for SQL DTU [available values: min, max or avg] | string | `"avg"` | no | @@ -67,7 +63,6 @@ Creates DataDog monitors with the following checks: | status\_enabled | Flag to enable Redis status monitor | string | `"true"` | 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 | | status\_timeframe | Monitor timeframe for Redis status [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/cloud/azure/sql-database/inputs.tf b/cloud/azure/sql-database/inputs.tf index e9ab810..10190b5 100644 --- a/cloud/azure/sql-database/inputs.tf +++ b/cloud/azure/sql-database/inputs.tf @@ -40,11 +40,6 @@ variable "filter_tags_custom_excluded" { } # Azure SQL Database specific variables -variable "status_silenced" { - description = "Groups to mute for Redis status monitor" - type = "map" - default = {} -} variable "status_enabled" { description = "Flag to enable Redis status monitor" @@ -76,12 +71,6 @@ variable "status_timeframe" { default = "last_5m" } -variable "cpu_silenced" { - description = "Groups to mute for SQL CPU monitor" - type = "map" - default = {} -} - variable "cpu_enabled" { description = "Flag to enable SQL CPU monitor" type = "string" @@ -122,12 +111,6 @@ variable "cpu_threshold_critical" { default = "90" } -variable "diskspace_silenced" { - description = "Groups to mute for SQL disk space monitor" - type = "map" - default = {} -} - variable "diskspace_enabled" { description = "Flag to enable SQL disk space monitor" type = "string" @@ -168,12 +151,6 @@ variable "diskspace_threshold_critical" { default = "90" } -variable "dtu_silenced" { - description = "Groups to mute for SQL DTU monitor" - type = "map" - default = {} -} - variable "dtu_enabled" { description = "Flag to enable SQL DTU monitor" type = "string" @@ -214,12 +191,6 @@ variable "dtu_threshold_critical" { default = "90" } -variable "deadlock_silenced" { - description = "Groups to mute for SQL Deadlock monitor" - type = "map" - default = {} -} - variable "deadlock_enabled" { description = "Flag to enable SQL Deadlock monitor" type = "string" diff --git a/cloud/azure/sql-database/monitors-sql-database.tf b/cloud/azure/sql-database/monitors-sql-database.tf index e7e563d..6d8908c 100644 --- a/cloud/azure/sql-database/monitors-sql-database.tf +++ b/cloud/azure/sql-database/monitors-sql-database.tf @@ -9,9 +9,7 @@ resource "datadog_monitor" "status" { ) != 1 EOQ - type = "metric alert" - - silenced = "${var.status_silenced}" + type = "query alert" notify_no_data = true evaluation_delay = "${var.evaluation_delay}" @@ -37,15 +35,13 @@ resource "datadog_monitor" "sql-database_cpu" { ) > ${var.cpu_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.cpu_threshold_critical}" warning = "${var.cpu_threshold_warning}" } - silenced = "${var.cpu_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -64,7 +60,7 @@ resource "datadog_monitor" "sql-database_free_space_low" { name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] SQL Database high disk usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.diskspace_message, var.message)}" - type = "metric alert" + type = "query alert" query = < ${var.cpu_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.cpu_threshold_critical}" warning = "${var.cpu_threshold_warning}" } - silenced = "${var.cpu_silenced}" - notify_no_data = true evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -36,7 +34,7 @@ resource "datadog_monitor" "sql_elasticpool_free_space_low" { name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] SQL Elastic Pool high disk usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.diskspace_message, var.message)}" - type = "metric alert" + type = "query alert" query = < ${var.su_utilization_threshold_critical} EOQ - type = "metric alert" + type = "query alert" notify_no_data = false evaluation_delay = "${var.evaluation_delay}" @@ -54,8 +52,6 @@ resource "datadog_monitor" "su_utilization" { critical = "${var.su_utilization_threshold_critical}" } - silenced = "${var.su_utilization_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform", "${var.su_utilization_extra_tags}"] } @@ -71,7 +67,7 @@ resource "datadog_monitor" "failed_function_requests" { ) * 100 > ${var.failed_function_requests_threshold_critical} EOQ - type = "metric alert" + type = "query alert" notify_no_data = false evaluation_delay = "${var.evaluation_delay}" @@ -88,8 +84,6 @@ resource "datadog_monitor" "failed_function_requests" { critical = "${var.failed_function_requests_threshold_critical}" } - silenced = "${var.failed_function_requests_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform", "${var.failed_function_requests_extra_tags}"] } @@ -104,7 +98,7 @@ resource "datadog_monitor" "conversion_errors" { ) > ${var.conversion_errors_threshold_critical} EOQ - type = "metric alert" + type = "query alert" notify_no_data = false evaluation_delay = "${var.evaluation_delay}" @@ -121,8 +115,6 @@ resource "datadog_monitor" "conversion_errors" { critical = "${var.conversion_errors_threshold_critical}" } - silenced = "${var.conversion_errors_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform", "${var.conversion_errors_extra_tags}"] } @@ -137,7 +129,7 @@ resource "datadog_monitor" "runtime_errors" { ) > ${var.runtime_errors_threshold_critical} EOQ - type = "metric alert" + type = "query alert" notify_no_data = false evaluation_delay = "${var.evaluation_delay}" @@ -154,7 +146,5 @@ resource "datadog_monitor" "runtime_errors" { critical = "${var.runtime_errors_threshold_critical}" } - silenced = "${var.runtime_errors_silenced}" - tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:stream-analytics", "team:claranet", "created-by:terraform", "${var.runtime_errors_extra_tags}"] } diff --git a/cloud/azure/virtual-machine/README.md b/cloud/azure/virtual-machine/README.md index 1c1548b..a4b4a6e 100644 --- a/cloud/azure/virtual-machine/README.md +++ b/cloud/azure/virtual-machine/README.md @@ -27,7 +27,6 @@ Creates DataDog monitors with the following checks: | cpu\_remaining\_rate\_enabled | Flag to enable Virtual Machine CPU remaining monitor | string | `"true"` | no | | cpu\_remaining\_rate\_extra\_tags | Extra tags for Virtual Machine CPU remaining monitor | list | `[]` | no | | cpu\_remaining\_rate\_message | Custom message for Virtual Machine CPU remaining monitor | string | `""` | no | -| cpu\_remaining\_rate\_silenced | Groups to mute for Virtual Machine CPU remaining monitor | map | `{}` | no | | cpu\_remaining\_rate\_threshold\_critical | Virtual Machine CPU rate limit (critical threshold) | string | `"15"` | no | | cpu\_remaining\_rate\_threshold\_warning | Virtual Machine CPU rate limit (warning threshold) | string | `"30"` | no | | cpu\_remaining\_rate\_time\_aggregator | Monitor aggregator for Virtual Machine CPU remaining [available values: min, max, sum or avg] | string | `"min"` | no | @@ -35,7 +34,6 @@ Creates DataDog monitors with the following checks: | cpu\_usage\_enabled | Flag to enable Virtual Machine status monitor | string | `"true"` | no | | cpu\_usage\_extra\_tags | Extra tags for Virtual Machine status monitor | list | `[]` | no | | cpu\_usage\_message | Custom message for Virtual Machine CPU monitor | string | `""` | no | -| cpu\_usage\_silenced | Groups to mute for Virtual Machine CPU monitor | map | `{}` | no | | cpu\_usage\_threshold\_critical | Virtual Machine CPU usage in percent (critical threshold) | string | `"90"` | no | | cpu\_usage\_threshold\_warning | Virtual Machine CPU usage in percent (warning threshold) | string | `"80"` | no | | cpu\_usage\_time\_aggregator | Monitor aggregator for Virtual Machine CPU [available values: min, max or avg] | string | `"min"` | no | @@ -51,7 +49,6 @@ Creates DataDog monitors with the following checks: | status\_enabled | Flag to enable Virtual Machine status monitor | string | `"true"` | no | | status\_extra\_tags | Extra tags for Virtual Machine status monitor | list | `[]` | no | | status\_message | Custom message for Virtual Machine status monitor | string | `""` | no | -| status\_silenced | Groups to mute for Virtual Machine status monitor | map | `{}` | no | | status\_time\_aggregator | Monitor aggregator for Virtual Machine status [available values: min, max or avg] | string | `"max"` | no | | status\_timeframe | Monitor timeframe for Virtual Machine status [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/cloud/azure/virtual-machine/inputs.tf b/cloud/azure/virtual-machine/inputs.tf index 4de4cad..485a86d 100644 --- a/cloud/azure/virtual-machine/inputs.tf +++ b/cloud/azure/virtual-machine/inputs.tf @@ -40,11 +40,6 @@ variable "filter_tags_custom_excluded" { } # Azure Virtual Machine specific variables -variable "status_silenced" { - description = "Groups to mute for Virtual Machine status monitor" - type = "map" - default = {} -} variable "status_enabled" { description = "Flag to enable Virtual Machine status monitor" @@ -76,12 +71,6 @@ variable "status_timeframe" { default = "last_5m" } -variable "cpu_usage_silenced" { - description = "Groups to mute for Virtual Machine CPU monitor" - type = "map" - default = {} -} - variable "cpu_usage_enabled" { description = "Flag to enable Virtual Machine status monitor" type = "string" @@ -122,12 +111,6 @@ variable "cpu_usage_threshold_critical" { default = "90" } -variable "cpu_remaining_rate_silenced" { - description = "Groups to mute for Virtual Machine CPU remaining monitor" - type = "map" - default = {} -} - variable "cpu_remaining_rate_enabled" { description = "Flag to enable Virtual Machine CPU remaining monitor" type = "string" diff --git a/cloud/azure/virtual-machine/monitors-virtual-machine.tf b/cloud/azure/virtual-machine/monitors-virtual-machine.tf index 49ecb0c..aaeddc7 100644 --- a/cloud/azure/virtual-machine/monitors-virtual-machine.tf +++ b/cloud/azure/virtual-machine/monitors-virtual-machine.tf @@ -10,9 +10,7 @@ resource "datadog_monitor" "virtualmachine_status" { ) < 1 EOQ - type = "metric alert" - - silenced = "${var.status_silenced}" + type = "query alert" notify_no_data = true evaluation_delay = "${var.evaluation_delay}" @@ -38,15 +36,13 @@ resource "datadog_monitor" "virtualmachine_cpu_usage" { ) > ${var.cpu_usage_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { critical = "${var.cpu_usage_threshold_critical}" warning = "${var.cpu_usage_threshold_warning}" } - silenced = "${var.cpu_usage_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -74,15 +70,13 @@ resource "datadog_monitor" "virtualmachine_credit_cpu_remaining_too_low" { * 100 , 100) < ${var.cpu_remaining_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.cpu_remaining_rate_threshold_warning}" critical = "${var.cpu_remaining_rate_threshold_critical}" } - silenced = "${var.cpu_remaining_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 diff --git a/cloud/gcp/big-query/README.md b/cloud/gcp/big-query/README.md index fb29014..0331fca 100644 --- a/cloud/gcp/big-query/README.md +++ b/cloud/gcp/big-query/README.md @@ -33,14 +33,12 @@ Creates DataDog monitors with the following checks: | available\_slots\_enabled | Flag to enable GCP Big Query Available Slots monitor | string | `"true"` | no | | available\_slots\_extra\_tags | Extra tags for GCP Big Query Available Slots monitor | list | `[]` | no | | available\_slots\_message | Custom message for the Available Slots monitor | string | `""` | no | -| available\_slots\_silenced | Groups to mute for GCP Big Query Available Slots monitor. | map | `{}` | no | | available\_slots\_threshold\_critical | Available Slots (critical threshold) | string | `"200"` | no | | available\_slots\_threshold\_warning | Available Slots (warning threshold) | string | `"300"` | no | | available\_slots\_timeframe | Timeframe for the Available Slots monitor | string | `"last_5m"` | no | | concurrent\_queries\_enabled | Flag to enable GCP Big Query Concurrent Queries monitor | string | `"true"` | no | | concurrent\_queries\_extra\_tags | Extra tags for GCP Big Query Concurrent Queries monitor | list | `[]` | no | | concurrent\_queries\_message | Custom message for the Concurrent Queries monitor | string | `""` | no | -| concurrent\_queries\_silenced | Groups to mute for GCP Big Query Concurrent Queries monitor | map | `{}` | no | | concurrent\_queries\_threshold\_critical | Concurrent Queries (critical threshold) (hard limit 50) | string | `"45"` | no | | concurrent\_queries\_threshold\_warning | Concurrent Queries (warning threshold) (hard limit 50) | string | `"40"` | no | | concurrent\_queries\_timeframe | Timeframe for the Concurrent Queries monitor | string | `"last_5m"` | no | @@ -49,7 +47,6 @@ Creates DataDog monitors with the following checks: | execution\_time\_enabled | Flag to enable GCP Big Query Execution Time monitor | string | `"true"` | no | | execution\_time\_extra\_tags | Extra tags for GCP Big Query Execution Time monitor | list | `[]` | no | | execution\_time\_message | Custom message for the Execution Time monitor | string | `""` | no | -| execution\_time\_silenced | Groups to mute for GCP Big Query Execution Time monitor. | map | `{}` | no | | execution\_time\_threshold\_critical | Average Execution Time in seconds (critical threshold) | string | `"150"` | no | | execution\_time\_threshold\_warning | Average Execution Time in seconds (warning threshold) | string | `"100"` | no | | execution\_time\_timeframe | Timeframe for the Execution Time monitor | string | `"last_5m"` | no | @@ -60,42 +57,36 @@ Creates DataDog monitors with the following checks: | scanned\_bytes\_billed\_enabled | Flag to enable GCP Big Query Scanned Bytes Billed monitor | string | `"true"` | no | | scanned\_bytes\_billed\_extra\_tags | Extra tags for GCP Big Query Scanned Bytes Billed monitor | list | `[]` | no | | scanned\_bytes\_billed\_message | Custom message for the Scanned Bytes Billed monitor | string | `""` | no | -| scanned\_bytes\_billed\_silenced | Groups to mute for GCP Big Query Scanned Bytes Billed monitor. | map | `{}` | no | | scanned\_bytes\_billed\_threshold\_critical | Scanned Bytes Billed (critical threshold) | string | `"1"` | no | | scanned\_bytes\_billed\_threshold\_warning | Scanned Bytes Billed (warning threshold) | string | `"0"` | no | | scanned\_bytes\_billed\_timeframe | Timeframe for the Scanned Bytes Billed monitor | string | `"last_4h"` | no | | scanned\_bytes\_enabled | Flag to enable GCP Big Query Scanned Bytes monitor | string | `"true"` | no | | scanned\_bytes\_extra\_tags | Extra tags for GCP Big Query Scanned Bytes monitor | list | `[]` | no | | scanned\_bytes\_message | Custom message for the Scanned Bytes monitor | string | `""` | no | -| scanned\_bytes\_silenced | Groups to mute for GCP Big Query Scanned Bytes monitor. | map | `{}` | no | | scanned\_bytes\_threshold\_critical | Scanned Bytes (critical threshold) | string | `"1"` | no | | scanned\_bytes\_threshold\_warning | Scanned Bytes (warning threshold) | string | `"0"` | no | | scanned\_bytes\_timeframe | Timeframe for the Scanned Bytes monitor | string | `"last_4h"` | no | | stored\_bytes\_enabled | Flag to enable GCP Big Query Stored Bytes monitor | string | `"true"` | no | | stored\_bytes\_extra\_tags | Extra tags for GCP Big Query Stored Bytes monitor | list | `[]` | no | | stored\_bytes\_message | Custom message for the Stored Bytes monitor | string | `""` | no | -| stored\_bytes\_silenced | Groups to mute for GCP Big Query Stored Bytes monitor. | map | `{}` | no | | stored\_bytes\_threshold\_critical | Stored Bytes in fraction (critical threshold) | string | `"1"` | no | | stored\_bytes\_threshold\_warning | Stored Bytes in fraction (warning threshold) | string | `"0"` | no | | stored\_bytes\_timeframe | Timeframe for the Stored Bytes monitor | string | `"last_5m"` | no | | table\_count\_enabled | Flag to enable GCP Big Query Table Count monitor | string | `"true"` | no | | table\_count\_extra\_tags | Extra tags for GCP Big Query Table Count monitor | list | `[]` | no | | table\_count\_message | Custom message for the Table Count monitor | string | `""` | no | -| table\_count\_silenced | Groups to mute for GCP Big Query Table Count monitor. | map | `{}` | no | | table\_count\_threshold\_critical | Table Count (critical threshold) | string | `"1"` | no | | table\_count\_threshold\_warning | Table Count (warning threshold) | string | `"0"` | no | | table\_count\_timeframe | Timeframe for the Table Count monitor | string | `"last_4h"` | no | | uploaded\_bytes\_billed\_enabled | Flag to enable GCP Big Query Uploaded Bytes Billed monitor | string | `"true"` | no | | uploaded\_bytes\_billed\_extra\_tags | Extra tags for GCP Big Query Scanned Bytes monitor | list | `[]` | no | | uploaded\_bytes\_billed\_message | Custom message for the Uploaded Bytes Billed monitor | string | `""` | no | -| uploaded\_bytes\_billed\_silenced | Groups to mute for GCP Big Query Uploaded Bytes Billed monitor. | map | `{}` | no | | uploaded\_bytes\_billed\_threshold\_critical | Uploaded Bytes Billed (critical threshold) | string | `"1"` | no | | uploaded\_bytes\_billed\_threshold\_warning | Uploaded Bytes Billed (warning threshold) | string | `"0"` | no | | uploaded\_bytes\_billed\_timeframe | Timeframe for the Uploaded Bytes Billed monitor | string | `"last_4h"` | no | | uploaded\_bytes\_enabled | Flag to enable GCP Big Query Uploaded Bytes monitor | string | `"true"` | no | | uploaded\_bytes\_extra\_tags | Extra tags for GCP Big Query Uploaded Bytes monitor | list | `[]` | no | | uploaded\_bytes\_message | Custom message for the Uploaded Bytes monitor | string | `""` | no | -| uploaded\_bytes\_silenced | Groups to mute for GCP Big Query Uploaded Bytes monitor. | map | `{}` | no | | uploaded\_bytes\_threshold\_critical | Uploaded Bytes (critical threshold) | string | `"1"` | no | | uploaded\_bytes\_threshold\_warning | Uploaded Bytes (warning threshold) | string | `"0"` | no | | uploaded\_bytes\_timeframe | Timeframe for the Uploaded Bytes monitor | string | `"last_4h"` | no | diff --git a/cloud/gcp/big-query/inputs.tf b/cloud/gcp/big-query/inputs.tf index 32e86e5..5bfe337 100644 --- a/cloud/gcp/big-query/inputs.tf +++ b/cloud/gcp/big-query/inputs.tf @@ -59,12 +59,6 @@ variable "concurrent_queries_threshold_critical" { default = 45 } -variable "concurrent_queries_silenced" { - description = "Groups to mute for GCP Big Query Concurrent Queries monitor" - type = "map" - default = {} -} - variable "concurrent_queries_enabled" { description = "Flag to enable GCP Big Query Concurrent Queries monitor" type = "string" @@ -105,12 +99,6 @@ variable "execution_time_threshold_critical" { default = 150 } -variable "execution_time_silenced" { - description = "Groups to mute for GCP Big Query Execution Time monitor." - type = "map" - default = {} -} - variable "execution_time_enabled" { description = "Flag to enable GCP Big Query Execution Time monitor" type = "string" @@ -151,12 +139,6 @@ variable "scanned_bytes_threshold_critical" { default = 1 } -variable "scanned_bytes_silenced" { - description = "Groups to mute for GCP Big Query Scanned Bytes monitor." - type = "map" - default = {} -} - variable "scanned_bytes_enabled" { description = "Flag to enable GCP Big Query Scanned Bytes monitor" type = "string" @@ -197,12 +179,6 @@ variable "scanned_bytes_billed_threshold_critical" { default = 1 } -variable "scanned_bytes_billed_silenced" { - description = "Groups to mute for GCP Big Query Scanned Bytes Billed monitor." - type = "map" - default = {} -} - variable "scanned_bytes_billed_enabled" { description = "Flag to enable GCP Big Query Scanned Bytes Billed monitor" type = "string" @@ -243,12 +219,6 @@ variable "available_slots_threshold_critical" { default = 200 } -variable "available_slots_silenced" { - description = "Groups to mute for GCP Big Query Available Slots monitor." - type = "map" - default = {} -} - variable "available_slots_enabled" { description = "Flag to enable GCP Big Query Available Slots monitor" type = "string" @@ -289,12 +259,6 @@ variable "stored_bytes_threshold_critical" { default = 1 } -variable "stored_bytes_silenced" { - description = "Groups to mute for GCP Big Query Stored Bytes monitor." - type = "map" - default = {} -} - variable "stored_bytes_enabled" { description = "Flag to enable GCP Big Query Stored Bytes monitor" type = "string" @@ -335,12 +299,6 @@ variable "table_count_threshold_critical" { default = 1 } -variable "table_count_silenced" { - description = "Groups to mute for GCP Big Query Table Count monitor." - type = "map" - default = {} -} - variable "table_count_enabled" { description = "Flag to enable GCP Big Query Table Count monitor" type = "string" @@ -381,12 +339,6 @@ variable "uploaded_bytes_threshold_critical" { default = 1 } -variable "uploaded_bytes_silenced" { - description = "Groups to mute for GCP Big Query Uploaded Bytes monitor." - type = "map" - default = {} -} - variable "uploaded_bytes_enabled" { description = "Flag to enable GCP Big Query Uploaded Bytes monitor" type = "string" @@ -427,12 +379,6 @@ variable "uploaded_bytes_billed_threshold_critical" { default = 1 } -variable "uploaded_bytes_billed_silenced" { - description = "Groups to mute for GCP Big Query Uploaded Bytes Billed monitor." - type = "map" - default = {} -} - variable "uploaded_bytes_billed_enabled" { description = "Flag to enable GCP Big Query Uploaded Bytes Billed monitor" type = "string" diff --git a/cloud/gcp/big-query/monitors-big-query.tf b/cloud/gcp/big-query/monitors-big-query.tf index 14b43dd..6575b87 100644 --- a/cloud/gcp/big-query/monitors-big-query.tf +++ b/cloud/gcp/big-query/monitors-big-query.tf @@ -6,7 +6,7 @@ resource "datadog_monitor" "concurrent_queries" { name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] GCP Big Query Concurrent Queries {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = "${coalesce(var.concurrent_queries_message, var.message)}" - type = "metric alert" + type = "query alert" query = < ${var.evictedkeys_change_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.evictedkeys_change_threshold_warning}" critical = "${var.evictedkeys_change_threshold_critical}" } - silenced = "${var.evictedkeys_change_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -77,15 +73,13 @@ resource "datadog_monitor" "expirations" { ) > ${var.expirations_rate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.expirations_rate_threshold_warning}" critical = "${var.expirations_rate_threshold_critical}" } - silenced = "${var.expirations_rate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -111,15 +105,13 @@ resource "datadog_monitor" "blocked_clients" { ) * 100 > ${var.blocked_clients_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.blocked_clients_threshold_warning}" critical = "${var.blocked_clients_threshold_critical}" } - silenced = "${var.blocked_clients_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -144,15 +136,13 @@ resource "datadog_monitor" "keyspace_full" { ) == ${var.keyspace_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.keyspace_threshold_warning}" critical = "${var.keyspace_threshold_critical}" } - silenced = "${var.keyspace_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -178,15 +168,13 @@ resource "datadog_monitor" "memory_used" { ) * 100 > ${var.mem_used_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.mem_used_threshold_warning}" critical = "${var.mem_used_threshold_critical}" } - silenced = "${var.mem_used_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -211,15 +199,13 @@ resource "datadog_monitor" "memory_frag" { * 100 > ${var.mem_frag_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.mem_frag_threshold_warning}" critical = "${var.mem_frag_threshold_critical}" } - silenced = "${var.mem_frag_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -244,15 +230,13 @@ resource "datadog_monitor" "rejected_connections" { ) > ${var.rejected_con_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.rejected_con_threshold_warning}" critical = "${var.rejected_con_threshold_critical}" } - silenced = "${var.rejected_con_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -277,15 +261,13 @@ resource "datadog_monitor" "latency" { ) > ${var.latency_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.latency_threshold_warning}" critical = "${var.latency_threshold_critical}" } - silenced = "${var.latency_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 @@ -312,15 +294,13 @@ resource "datadog_monitor" "hitrate" { ) * 100 < ${var.hitrate_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.hitrate_threshold_warning}" critical = "${var.hitrate_threshold_critical}" } - silenced = "${var.hitrate_silenced}" - notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 diff --git a/middleware/apache/README.md b/middleware/apache/README.md index 95005be..167ab3b 100644 --- a/middleware/apache/README.md +++ b/middleware/apache/README.md @@ -25,7 +25,6 @@ Creates DataDog monitors with the following checks: | apache\_connect\_enabled | Flag to enable Apache status monitor | string | `"true"` | no | | 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\_warning | Apache status monitor (warning threshold) | string | `"3"` | no | | environment | Architecture Environment | string | n/a | yes | | evaluation\_delay | Delay in seconds for the metric evaluation | string | `"15"` | no | diff --git a/middleware/apache/inputs.tf b/middleware/apache/inputs.tf index c3178fc..ba9c421 100644 --- a/middleware/apache/inputs.tf +++ b/middleware/apache/inputs.tf @@ -41,12 +41,6 @@ variable "filter_tags_custom_excluded" { # Apache Middleware specific -variable "apache_connect_silenced" { - description = "Groups to mute for Apache status monitor" - type = "map" - default = {} -} - variable "apache_connect_enabled" { description = "Flag to enable Apache status monitor" type = "string" diff --git a/middleware/apache/monitors-apache.tf b/middleware/apache/monitors-apache.tf index e1da39f..17c3371 100644 --- a/middleware/apache/monitors-apache.tf +++ b/middleware/apache/monitors-apache.tf @@ -23,7 +23,5 @@ resource "datadog_monitor" "datadog_apache_process" { locked = false require_full_window = true - silenced = "${var.apache_connect_silenced}" - 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 dcdd222..b1f1aa6 100644 --- a/middleware/nginx/README.md +++ b/middleware/nginx/README.md @@ -34,12 +34,10 @@ Creates DataDog monitors with the following checks: | 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\_no\_data\_timeframe | Nginx status monitor no data timeframe | string | `"10"` | no | -| nginx\_connect\_silenced | Groups to mute for Nginx status monitor | map | `{}` | no | | nginx\_connect\_threshold\_warning | Nginx status monitor (warning threshold) | string | `"3"` | no | | nginx\_dropped\_enabled | Flag to enable Nginx dropped monitor | string | `"true"` | no | | nginx\_dropped\_extra\_tags | Extra tags for Nginx dropped connections monitor | list | `[]` | no | | nginx\_dropped\_message | Custom message for Nginx dropped connections monitor | string | `""` | no | -| nginx\_dropped\_silenced | Groups to mute for Nginx dropped connections monitor | map | `{}` | no | | nginx\_dropped\_threshold\_critical | Nginx dropped connections critical threshold | string | `"0"` | no | | nginx\_dropped\_time\_aggregator | Monitor aggregator for Nginx dropped connections [available values: min, max or avg] | string | `"min"` | no | | nginx\_dropped\_timeframe | Monitor timeframe for Nginx dropped connections [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/middleware/nginx/inputs.tf b/middleware/nginx/inputs.tf index 0cece43..efae379 100644 --- a/middleware/nginx/inputs.tf +++ b/middleware/nginx/inputs.tf @@ -41,12 +41,6 @@ variable "filter_tags_custom_excluded" { # Nginx Middleware specific -variable "nginx_connect_silenced" { - description = "Groups to mute for Nginx status monitor" - type = "map" - default = {} -} - variable "nginx_connect_enabled" { description = "Flag to enable Nginx status monitor" type = "string" @@ -77,12 +71,6 @@ variable "nginx_connect_no_data_timeframe" { default = 10 } -variable "nginx_dropped_silenced" { - description = "Groups to mute for Nginx dropped connections monitor" - type = "map" - default = {} -} - variable "nginx_dropped_enabled" { description = "Flag to enable Nginx dropped monitor" type = "string" diff --git a/middleware/nginx/monitors-nginx.tf b/middleware/nginx/monitors-nginx.tf index 90def82..115259b 100644 --- a/middleware/nginx/monitors-nginx.tf +++ b/middleware/nginx/monitors-nginx.tf @@ -24,8 +24,6 @@ resource "datadog_monitor" "datadog_nginx_process" { locked = false require_full_window = true - silenced = "${var.nginx_connect_silenced}" - tags = ["env:${var.environment}", "type:middleware", "provider:nginx", "resource:nginx", "team:claranet", "created-by:terraform", "${var.nginx_connect_extra_tags}"] } @@ -55,7 +53,5 @@ resource "datadog_monitor" "datadog_nginx_dropped_connections" { locked = false require_full_window = true - silenced = "${var.nginx_dropped_silenced}" - tags = ["env:${var.environment}", "type:middleware", "provider:nginx", "resource:nginx", "team:claranet", "created-by:terraform", "${var.nginx_dropped_extra_tags}"] } diff --git a/middleware/php-fpm/README.md b/middleware/php-fpm/README.md index 55dcec6..45d1082 100644 --- a/middleware/php-fpm/README.md +++ b/middleware/php-fpm/README.md @@ -33,7 +33,6 @@ Creates DataDog monitors with the following checks: | php\_fpm\_busy\_enabled | Flag to enable PHP FPM busy worker monitor | string | `"true"` | 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 | `"90"` | no | | php\_fpm\_busy\_threshold\_warning | php fpm busy warning threshold | string | `"80"` | no | | php\_fpm\_busy\_time\_aggregator | Monitor aggregator for PHP FPM busy worker [available values: min, max or avg] | string | `"avg"` | no | @@ -42,7 +41,6 @@ Creates DataDog monitors with the following checks: | php\_fpm\_connect\_extra\_tags | Extra tags for PHP FPM status monitor | list | `[]` | no | | php\_fpm\_connect\_message | Custom message for PHP FPM status monitor | string | `""` | no | | php\_fpm\_connect\_no\_data\_timeframe | PHP FPM status monitor no data timeframe | string | `"10"` | no | -| php\_fpm\_connect\_silenced | Groups to mute for PHP FPM status monitor | map | `{}` | no | | php\_fpm\_connect\_threshold\_warning | PHP FPM status monitor (warning threshold) | string | `"3"` | no | | prefix\_slug | Prefix string to prepend between brackets on every monitors names | string | `""` | no | diff --git a/middleware/php-fpm/inputs.tf b/middleware/php-fpm/inputs.tf index a78f268..4887ecd 100644 --- a/middleware/php-fpm/inputs.tf +++ b/middleware/php-fpm/inputs.tf @@ -41,12 +41,6 @@ variable "filter_tags_custom_excluded" { # PHP FPM Middleware specific -variable "php_fpm_busy_silenced" { - description = "Groups to mute for PHP FPM busy worker monitor" - type = "map" - default = {} -} - variable "php_fpm_busy_enabled" { description = "Flag to enable PHP FPM busy worker monitor" type = "string" @@ -87,12 +81,6 @@ variable "php_fpm_busy_threshold_critical" { default = 90 } -variable "php_fpm_connect_silenced" { - description = "Groups to mute for PHP FPM status monitor" - type = "map" - default = {} -} - variable "php_fpm_connect_enabled" { description = "Flag to enable PHP FPM status monitor" type = "string" diff --git a/middleware/php-fpm/monitors-fpm.tf b/middleware/php-fpm/monitors-fpm.tf index 74706f0..464cd5e 100644 --- a/middleware/php-fpm/monitors-fpm.tf +++ b/middleware/php-fpm/monitors-fpm.tf @@ -24,8 +24,6 @@ resource "datadog_monitor" "php_fpm_connect" { locked = false require_full_window = true - silenced = "${var.php_fpm_connect_silenced}" - tags = ["env:${var.environment}", "type:middleware", "provider:php-fpm", "resource:php-fpm", "team:claranet", "created-by:terraform", "${var.php_fpm_connect_extra_tags}"] } @@ -34,7 +32,7 @@ resource "datadog_monitor" "php_fpm_connect_idle" { name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Php-fpm busy worker {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.php_fpm_busy_message, var.message)}" - type = "metric alert" + type = "query alert" query = < ${var.cpu_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.cpu_threshold_warning}" @@ -25,8 +25,6 @@ resource "datadog_monitor" "cpu" { locked = false require_full_window = true - silenced = "${var.cpu_silenced}" - tags = ["env:${var.environment}", "type:system", "provider:system-check", "resource:generic", "team:claranet", "created-by:terraform", "${var.cpu_extra_tags}"] } @@ -41,7 +39,7 @@ resource "datadog_monitor" "load" { ) > ${var.load_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.load_threshold_warning}" @@ -57,8 +55,6 @@ resource "datadog_monitor" "load" { locked = false require_full_window = true - silenced = "${var.load_silenced}" - tags = ["env:${var.environment}", "type:system", "provider:system-core", "resource:generic", "team:claranet", "created-by:terraform", "${var.load_extra_tags}"] } @@ -73,7 +69,7 @@ resource "datadog_monitor" "disk_space" { * 100 > ${var.disk_space_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.disk_space_threshold_warning}" @@ -89,8 +85,6 @@ resource "datadog_monitor" "disk_space" { locked = false require_full_window = true - silenced = "${var.disk_space_silenced}" - tags = ["env:${var.environment}", "type:system", "provider:disk", "resource:generic", "team:claranet", "created-by:terraform", "${var.disk_space_extra_tags}"] } @@ -129,8 +123,6 @@ resource "datadog_monitor" "disk_space_forecast" { evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" - silenced = "${var.disk_space_forecast_silenced}" - tags = ["env:${var.environment}", "type:system", "provider:disk", "resource:generic", "team:claranet", "created-by:terraform", "${var.disk_space_forecast_extra_tags}"] } @@ -145,7 +137,7 @@ resource "datadog_monitor" "disk_inodes" { * 100 > ${var.disk_inodes_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.disk_inodes_threshold_warning}" @@ -161,8 +153,6 @@ resource "datadog_monitor" "disk_inodes" { locked = false require_full_window = true - silenced = "${var.disk_inodes_silenced}" - tags = ["env:${var.environment}", "type:system", "provider:disk", "resource:generic", "team:claranet", "created-by:terraform", "${var.disk_inodes_extra_tags}"] } @@ -178,7 +168,7 @@ resource "datadog_monitor" "memory" { < ${var.memory_threshold_critical} EOQ - type = "metric alert" + type = "query alert" thresholds { warning = "${var.memory_threshold_warning}" @@ -195,7 +185,5 @@ resource "datadog_monitor" "memory" { locked = false require_full_window = true - silenced = "${var.memory_silenced}" - tags = ["env:${var.environment}", "type:system", "provider:system-check", "resource:generic", "team:claranet", "created-by:terraform", "${var.memory_extra_tags}"] } diff --git a/system/unreachable/README.md b/system/unreachable/README.md index 66d9977..7ab8e19 100644 --- a/system/unreachable/README.md +++ b/system/unreachable/README.md @@ -34,7 +34,6 @@ Creates DataDog monitors with the following checks: | unreachable\_extra\_tags | Extra tags for Host unreachable monitor | list | `[]` | no | | unreachable\_message | Custom message for Host unreachable monitor | string | `""` | no | | unreachable\_no\_data\_timeframe | Timeframe for Host unreachable monitor to alert on no data | string | `"20"` | no | -| unreachable\_silenced | Groups to mute for Host unreachable monitor | map | `{}` | no | ## Outputs diff --git a/system/unreachable/inputs.tf b/system/unreachable/inputs.tf index 5159bc6..5f34de0 100644 --- a/system/unreachable/inputs.tf +++ b/system/unreachable/inputs.tf @@ -41,12 +41,6 @@ variable "filter_tags_custom_excluded" { # Unreachable -variable "unreachable_silenced" { - description = "Groups to mute for Host unreachable monitor" - type = "map" - default = {} -} - variable "unreachable_enabled" { description = "Flag to enable Host unreachable monitor" type = "string" diff --git a/system/unreachable/monitors-unreachable.tf b/system/unreachable/monitors-unreachable.tf index 9f46b7f..5e7dbcf 100644 --- a/system/unreachable/monitors-unreachable.tf +++ b/system/unreachable/monitors-unreachable.tf @@ -24,7 +24,5 @@ resource "datadog_monitor" "host_unreachable" { locked = false require_full_window = true - silenced = "${var.unreachable_silenced}" - tags = ["env:${var.environment}", "type:system", "provider:host", "resource:unreachable", "team:claranet", "created-by:terraform", "${var.unreachable_extra_tags}"] }