diff --git a/caas/kubernetes/ark/monitors-ark.tf b/caas/kubernetes/ark/monitors-ark.tf index f7ca08b..a0279f3 100644 --- a/caas/kubernetes/ark/monitors-ark.tf +++ b/caas/kubernetes/ark/monitors-ark.tf @@ -4,9 +4,9 @@ resource "datadog_monitor" "ark_schedules_monitor" { type = "metric alert" message = "${coalesce(var.ark_schedules_monitor_message, var.message)}" - query = < 1 - EOF + EOQ thresholds { critical = 1 diff --git a/caas/kubernetes/ingress/vts/monitors-ingress.tf b/caas/kubernetes/ingress/vts/monitors-ingress.tf index b70f2d7..e170360 100644 --- a/caas/kubernetes/ingress/vts/monitors-ingress.tf +++ b/caas/kubernetes/ingress/vts/monitors-ingress.tf @@ -3,12 +3,12 @@ resource "datadog_monitor" "nginx_ingress_too_many_5xx" { name = "[${var.environment}] Nginx Ingress 5xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.ingress_5xx_message, var.message)}" - query = < ${var.ingress_5xx_threshold_critical} - EOF + EOQ type = "metric alert" @@ -37,12 +37,12 @@ resource "datadog_monitor" "nginx_ingress_too_many_4xx" { name = "[${var.environment}] Nginx Ingress 4xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.ingress_4xx_message, var.message)}" - query = < ${var.ingress_4xx_threshold_critical} - EOF + EOQ type = "metric alert" diff --git a/cloud/aws/alb/monitors-alb.tf b/cloud/aws/alb/monitors-alb.tf index 8241ffd..7e436bc 100644 --- a/cloud/aws/alb/monitors-alb.tf +++ b/cloud/aws/alb/monitors-alb.tf @@ -4,13 +4,13 @@ resource "datadog_monitor" "ALB_no_healthy_instances" { type = "metric alert" message = "${coalesce(var.alb_no_healthy_instances_message, var.message)}" - query = < ${var.latency_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -68,12 +68,12 @@ resource "datadog_monitor" "ALB_httpcode_5xx" { type = "metric alert" message = "${coalesce(var.httpcode_alb_5xx_message, var.message)}" - query = < ${var.httpcode_alb_5xx_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -100,12 +100,12 @@ resource "datadog_monitor" "ALB_httpcode_4xx" { type = "metric alert" message = "${coalesce(var.httpcode_alb_4xx_message, var.message)}" - query = < ${var.httpcode_alb_4xx_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -132,12 +132,12 @@ resource "datadog_monitor" "ALB_httpcode_target_5xx" { type = "metric alert" message = "${coalesce(var.httpcode_target_5xx_message, var.message)}" - query = < ${var.httpcode_target_5xx_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -164,12 +164,12 @@ resource "datadog_monitor" "ALB_httpcode_target_4xx" { type = "metric alert" message = "${coalesce(var.httpcode_target_4xx_message, var.message)}" - query = < ${var.httpcode_target_4xx_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" diff --git a/cloud/aws/apigateway/monitors-api.tf b/cloud/aws/apigateway/monitors-api.tf index cb6a9cc..b397a70 100644 --- a/cloud/aws/apigateway/monitors-api.tf +++ b/cloud/aws/apigateway/monitors-api.tf @@ -5,11 +5,11 @@ resource "datadog_monitor" "API_Gateway_latency" { type = "metric alert" message = "${coalesce(var.latency_message, var.message)}" - query = < ${var.latency_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -37,12 +37,12 @@ resource "datadog_monitor" "API_http_5xx_errors_count" { type = "metric alert" message = "${coalesce(var.http_5xx_requests_message, var.message)}" - query = < ${var.http_5xx_requests_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -70,12 +70,12 @@ resource "datadog_monitor" "API_http_4xx_errors_count" { type = "metric alert" message = "${coalesce(var.http_4xx_requests_message, var.message)}" - query = < ${var.http_4xx_requests_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" diff --git a/cloud/aws/elasticache/common/monitors-elasticache.tf b/cloud/aws/elasticache/common/monitors-elasticache.tf index 40e4e9d..5a3ccdd 100644 --- a/cloud/aws/elasticache/common/monitors-elasticache.tf +++ b/cloud/aws/elasticache/common/monitors-elasticache.tf @@ -5,11 +5,11 @@ resource "datadog_monitor" "elasticache_eviction" { type = "metric alert" - query = < ${var.eviction_threshold_critical} - EOF + EOQ thresholds { warning = "${var.eviction_threshold_warning}" @@ -38,11 +38,11 @@ resource "datadog_monitor" "elasticache_max_connection" { type = "metric alert" - query = <= 65000 - EOF + EOQ notify_no_data = true evaluation_delay = "${var.evaluation_delay}" @@ -66,11 +66,11 @@ resource "datadog_monitor" "elasticache_no_connection" { type = "metric alert" - query = < ${var.swap_threshold_critical} - EOF + EOQ thresholds { warning = "${var.swap_threshold_warning}" @@ -127,11 +127,11 @@ resource "datadog_monitor" "elasticache_free_memory" { type = "metric alert" - query = < ${var.eviction_growing_threshold_critical} - EOF + EOQ thresholds { warning = "${var.eviction_growing_threshold_warning}" diff --git a/cloud/aws/elasticache/memcached/monitors-memcached.tf b/cloud/aws/elasticache/memcached/monitors-memcached.tf index ec95b24..fc4ef33 100644 --- a/cloud/aws/elasticache/memcached/monitors-memcached.tf +++ b/cloud/aws/elasticache/memcached/monitors-memcached.tf @@ -5,13 +5,13 @@ resource "datadog_monitor" "memcached_get_hits" { type = "metric alert" - query = < ${var.cpu_high_threshold_critical} - EOF + EOQ thresholds { warning = "${var.cpu_high_threshold_warning}" diff --git a/cloud/aws/elasticache/redis/monitors-redis.tf b/cloud/aws/elasticache/redis/monitors-redis.tf index b87055d..d10f6b2 100644 --- a/cloud/aws/elasticache/redis/monitors-redis.tf +++ b/cloud/aws/elasticache/redis/monitors-redis.tf @@ -5,13 +5,13 @@ resource "datadog_monitor" "redis_cache_hits" { type = "metric alert" - query = < ${var.cpu_high_threshold_critical} - EOF + EOQ notify_no_data = true evaluation_delay = "${var.evaluation_delay}" @@ -68,11 +68,11 @@ resource "datadog_monitor" "redis_replication_lag" { type = "metric alert" - query = < ${var.replication_lag_threshold_critical} - EOF + EOQ thresholds { warning = "${var.replication_lag_threshold_warning}" @@ -101,12 +101,12 @@ resource "datadog_monitor" "redis_commands" { type = "metric alert" - query = <= 2 -EOF + EOQ thresholds { warning = 1 @@ -45,12 +45,12 @@ resource "datadog_monitor" "es_free_space_low" { type = "metric alert" - query = < ${var.cpu_threshold_critical} -EOF + EOQ thresholds { warning = "${var.cpu_threshold_warning}" diff --git a/cloud/aws/elb/monitors-elb.tf b/cloud/aws/elb/monitors-elb.tf index c8fdbb5..0b84d42 100644 --- a/cloud/aws/elb/monitors-elb.tf +++ b/cloud/aws/elb/monitors-elb.tf @@ -3,13 +3,13 @@ resource "datadog_monitor" "ELB_no_healthy_instances" { name = "[${var.environment}] ELB healthy instances {{#is_alert}}is at 0{{/is_alert}}{{#is_warning}}is at {{value}}%{{/is_warning}}" message = "${coalesce(var.elb_no_healthy_instance_message, var.message)}" - query = < ${var.elb_4xx_threshold_critical} - EOF + EOQ type = "metric alert" @@ -72,12 +72,12 @@ resource "datadog_monitor" "ELB_too_much_5xx" { name = "[${var.environment}] ELB 5xx errors too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.elb_5xx_message, var.message)}" - query = < ${var.elb_5xx_threshold_critical} - EOF + EOQ type = "metric alert" @@ -106,12 +106,12 @@ resource "datadog_monitor" "ELB_too_much_4xx_backend" { name = "[${var.environment}] ELB backend 4xx errors too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.elb_backend_4xx_message, var.message)}" - query = < ${var.elb_backend_4xx_threshold_critical} - EOF + EOQ type = "metric alert" @@ -140,12 +140,12 @@ resource "datadog_monitor" "ELB_too_much_5xx_backend" { name = "[${var.environment}] ELB backend 5xx errors too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.elb_backend_5xx_message, var.message)}" - query = < ${var.elb_backend_5xx_threshold_critical} - EOF + EOQ type = "metric alert" @@ -174,11 +174,11 @@ resource "datadog_monitor" "ELB_backend_latency" { name = "[${var.environment}] ELB latency too high {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}" message = "${coalesce(var.elb_backend_latency_message, var.message)}" - query = < ${var.elb_backend_latency_critical} - EOF + EOQ type = "metric alert" diff --git a/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf b/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf index f23b7ca..b32ce4c 100644 --- a/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf +++ b/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf @@ -6,11 +6,11 @@ resource "datadog_monitor" "firehose_incoming_records" { type = "metric alert" - query = < ${var.aurora_replicalag_threshold_critical} -EOF + EOQ thresholds { warning = "${var.aurora_replicalag_threshold_warning}" diff --git a/cloud/aws/rds/aurora/postgresql/monitors-rds-aurora-postgresql.tf b/cloud/aws/rds/aurora/postgresql/monitors-rds-aurora-postgresql.tf index 14c8271..57248ac 100644 --- a/cloud/aws/rds/aurora/postgresql/monitors-rds-aurora-postgresql.tf +++ b/cloud/aws/rds/aurora/postgresql/monitors-rds-aurora-postgresql.tf @@ -6,11 +6,11 @@ resource "datadog_monitor" "rds_aurora_postgresql_replica_lag" { type = "metric alert" - query = < ${var.aurora_replicalag_threshold_critical} -EOF + EOQ thresholds { warning = "${var.aurora_replicalag_threshold_warning}" diff --git a/cloud/aws/rds/common/monitors-rds-common.tf b/cloud/aws/rds/common/monitors-rds-common.tf index 10a4d7b..369b896 100644 --- a/cloud/aws/rds/common/monitors-rds-common.tf +++ b/cloud/aws/rds/common/monitors-rds-common.tf @@ -6,11 +6,11 @@ resource "datadog_monitor" "rds_cpu_90_15min" { type = "metric alert" - query = < ${var.cpu_threshold_critical} -EOF + EOQ thresholds { warning = "${var.cpu_threshold_warning}" @@ -39,12 +39,12 @@ resource "datadog_monitor" "rds_free_space_low" { type = "metric alert" - query = < ${var.replicalag_threshold_critical} -EOF + EOQ thresholds { warning = "${var.replicalag_threshold_warning}" diff --git a/cloud/aws/vpn/monitors-vpn.tf b/cloud/aws/vpn/monitors-vpn.tf index a2c3afc..1e87080 100644 --- a/cloud/aws/vpn/monitors-vpn.tf +++ b/cloud/aws/vpn/monitors-vpn.tf @@ -3,11 +3,11 @@ resource "datadog_monitor" "VPN_status" { name = "[${var.environment}] VPN tunnel down" message = "${coalesce(var.vpn_status_message, var.message)}" - query = < ${var.failed_requests_threshold_critical} - EOF + EOQ thresholds { critical = "${var.failed_requests_threshold_critical}" @@ -66,12 +66,12 @@ resource "datadog_monitor" "apimgt_other_requests" { name = "[${var.environment}] API Management too many other requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.other_requests_message, var.message)}" - query = < ${var.other_requests_threshold_critical} - EOF + EOQ thresholds { critical = "${var.other_requests_threshold_critical}" @@ -99,12 +99,12 @@ resource "datadog_monitor" "apimgt_unauthorized_requests" { name = "[${var.environment}] API Management too many unauthorized requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.unauthorized_requests_message, var.message)}" - query = < ${var.unauthorized_requests_threshold_critical} - EOF + EOQ thresholds { critical = "${var.unauthorized_requests_threshold_critical}" @@ -132,14 +132,14 @@ resource "datadog_monitor" "apimgt_successful_requests" { name = "[${var.environment}] API Management successful requests rate too low {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.successful_requests_message, var.message)}" - query = < ${var.response_time_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -37,11 +37,11 @@ resource "datadog_monitor" "appservices_memory_usage_count" { type = "metric alert" message = "${coalesce(var.memory_usage_message, var.message)}" - query = < ${var.memory_usage_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -69,12 +69,12 @@ resource "datadog_monitor" "appservices_http_5xx_errors_count" { type = "metric alert" message = "${coalesce(var.http_5xx_requests_message, var.message)}" - query = < ${var.http_5xx_requests_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -102,12 +102,12 @@ resource "datadog_monitor" "appservices_http_4xx_errors_count" { type = "metric alert" message = "${coalesce(var.http_4xx_requests_message, var.message)}" - query = < ${var.http_4xx_requests_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -135,14 +135,14 @@ resource "datadog_monitor" "appservices_http_success_status_rate" { type = "metric alert" message = "${coalesce(var.http_successful_requests_message, var.message)}" - query = < ${var.latency_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -37,11 +37,11 @@ resource "datadog_monitor" "azure_search_throttled_queries_rate" { type = "metric alert" message = "${coalesce(var.throttled_queries_rate_message, var.message)}" - query = < ${var.throttled_queries_rate_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" diff --git a/cloud/azure/cosmosdb/monitors-cosmosdb.tf b/cloud/azure/cosmosdb/monitors-cosmosdb.tf index 4e30f78..4afde15 100644 --- a/cloud/azure/cosmosdb/monitors-cosmosdb.tf +++ b/cloud/azure/cosmosdb/monitors-cosmosdb.tf @@ -4,11 +4,11 @@ resource "datadog_monitor" "cosmos_db_status" { name = "[${var.environment}] Cosmos DB is down" message = "${coalesce(var.status_message, var.message)}" - query = < ${var.cosmos_db_4xx_request_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -82,13 +82,13 @@ resource "datadog_monitor" "cosmos_db_5xx_requests" { name = "[${var.environment}] Cosmos DB 5xx requests rate is high {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.cosmos_db_5xx_requests_message, var.message)}" - query = < ${var.cosmos_db_5xx_request_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -119,12 +119,12 @@ resource "datadog_monitor" "cosmos_db_scaling" { message = "${coalesce(var.cosmos_db_scaling_message, var.message)}" # List of available status codes : https://docs.microsoft.com/en-us/rest/api/cosmos-db/http-status-codes-for-cosmosdb - query = < ${var.cosmos_db_scaling_error_rate_threshold_critical} - EOF + EOQ type = "metric alert" diff --git a/cloud/azure/datalakestore/monitors-datalakestore.tf b/cloud/azure/datalakestore/monitors-datalakestore.tf index 8620fb1..82fc3ec 100644 --- a/cloud/azure/datalakestore/monitors-datalakestore.tf +++ b/cloud/azure/datalakestore/monitors-datalakestore.tf @@ -4,11 +4,11 @@ resource "datadog_monitor" "datalakestore_status" { name = "[${var.environment}] Datalake Store is down" message = "${coalesce(var.status_message, var.message)}" - query = < ${var.failed_messages_rate_thresold_critical} - EOF + EOQ type = "metric alert" @@ -68,7 +68,7 @@ resource "datadog_monitor" "eventgrid_unmatched_events" { name = "[${var.environment}] Event Grid too many unmatched events {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.unmatched_events_rate_message, var.message)}" - query = < ${var.unmatched_events_rate_thresold_critical} - EOF + EOQ type = "metric alert" diff --git a/cloud/azure/eventhub/monitors-eventhub.tf b/cloud/azure/eventhub/monitors-eventhub.tf index 12d83ea..52c059b 100644 --- a/cloud/azure/eventhub/monitors-eventhub.tf +++ b/cloud/azure/eventhub/monitors-eventhub.tf @@ -3,11 +3,11 @@ resource "datadog_monitor" "eventhub_status" { name = "[${var.environment}] Event Hub is down" message = "${coalesce(var.status_message, var.message)}" - query = < ${var.failed_requests_rate_thresold_critical} - EOF + EOQ type = "metric alert" @@ -65,14 +65,14 @@ resource "datadog_monitor" "eventhub_errors" { name = "[${var.environment}] Event Hub too many errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.errors_rate_message, var.message)}" - query = < ${var.errors_rate_thresold_critical} - EOF + EOQ type = "metric alert" diff --git a/cloud/azure/functions/monitors-functions.tf b/cloud/azure/functions/monitors-functions.tf index 995aa58..71db0fa 100644 --- a/cloud/azure/functions/monitors-functions.tf +++ b/cloud/azure/functions/monitors-functions.tf @@ -4,12 +4,12 @@ resource "datadog_monitor" "function_http_5xx_errors_rate" { type = "metric alert" message = "${coalesce(var.http_5xx_errors_rate_message, var.message)}" - query = < ${var.http_5xx_errors_rate_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -36,11 +36,11 @@ resource "datadog_monitor" "function_high_connections_count" { type = "metric alert" message = "${coalesce(var.high_connections_count_message, var.message)}" - query = < ${var.high_connections_count_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -67,11 +67,11 @@ resource "datadog_monitor" "function_high_threads_count" { type = "metric alert" message = "${coalesce(var.high_threads_count_message, var.message)}" - query = < ${var.high_threads_count_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" diff --git a/cloud/azure/iothubs/monitors-iothubs.tf b/cloud/azure/iothubs/monitors-iothubs.tf index ba85e1c..7d234d5 100644 --- a/cloud/azure/iothubs/monitors-iothubs.tf +++ b/cloud/azure/iothubs/monitors-iothubs.tf @@ -3,14 +3,14 @@ resource "datadog_monitor" "too_many_jobs_failed" { name = "[${var.environment}] IOT Hub Too many jobs failed {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.failed_jobs_rate_message, var.message)}" - query = < ${var.failed_jobs_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -39,14 +39,14 @@ resource "datadog_monitor" "too_many_list_jobs_failed" { name = "[${var.environment}] IOT Hub Too many list_jobs failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.failed_listjobs_rate_message, var.message)}" - query = < ${var.failed_listjobs_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -75,14 +75,14 @@ resource "datadog_monitor" "too_many_query_jobs_failed" { name = "[${var.environment}] IOT Hub Too many query_jobs failed {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.failed_queryjobs_rate_message, var.message)}" - query = < ${var.failed_queryjobs_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -111,11 +111,11 @@ resource "datadog_monitor" "status" { name = "[${var.environment}] IOT Hub is down" message = "${coalesce(var.status_message, var.message)}" - query = < ${var.failed_c2d_methods_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -203,14 +203,14 @@ resource "datadog_monitor" "too_many_c2d_twin_read_failed" { name = "[${var.environment}] IOT Hub Too many c2d twin read failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.failed_c2d_twin_read_rate_message, var.message)}" - query = < ${var.failed_c2d_twin_read_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -239,14 +239,14 @@ resource "datadog_monitor" "too_many_c2d_twin_update_failed" { name = "[${var.environment}] IOT Hub Too many c2d twin update failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.failed_c2d_twin_update_rate_message, var.message)}" - query = < ${var.failed_c2d_twin_update_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -275,14 +275,14 @@ resource "datadog_monitor" "too_many_d2c_twin_read_failed" { name = "[${var.environment}] IOT Hub Too many d2c twin read failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.failed_d2c_twin_read_rate_message, var.message)}" - query = < ${var.failed_d2c_twin_read_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -311,14 +311,14 @@ resource "datadog_monitor" "too_many_d2c_twin_update_failed" { name = "[${var.environment}] IOT Hub Too many d2c twin update failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.failed_d2c_twin_update_rate_message, var.message)}" - query = < ${var.failed_d2c_twin_update_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -347,7 +347,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_dropped" { name = "[${var.environment}] IOT Hub Too many d2c telemetry egress dropped {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = "${coalesce(var.dropped_d2c_telemetry_egress_message, var.message)}" - query = < ${var.dropped_d2c_telemetry_egress_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -385,7 +385,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_orphaned" { name = "[${var.environment}] IOT Hub Too many d2c telemetry egress orphaned {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = "${coalesce(var.orphaned_d2c_telemetry_egress_message, var.message)}" - query = < ${var.orphaned_d2c_telemetry_egress_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -423,7 +423,7 @@ resource "datadog_monitor" "too_many_d2c_telemetry_egress_invalid" { name = "[${var.environment}] IOT Hub Too many d2c telemetry egress invalid {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = "${coalesce(var.invalid_d2c_telemetry_egress_message, var.message)}" - query = < ${var.invalid_d2c_telemetry_egress_rate_threshold_critical} - EOF + EOQ type = "metric alert" @@ -461,13 +461,13 @@ resource "datadog_monitor" "too_many_d2c_telemetry_ingress_nosent" { name = "[${var.environment}] IOT Hub Too many d2c telemetry ingress not sent {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = "${coalesce(var.too_many_d2c_telemetry_ingress_nosent_message, var.message)}" - query = < 0 - EOF + EOQ type = "metric alert" diff --git a/cloud/azure/keyvault/monitors-keyvault.tf b/cloud/azure/keyvault/monitors-keyvault.tf index 984edb8..02865b3 100644 --- a/cloud/azure/keyvault/monitors-keyvault.tf +++ b/cloud/azure/keyvault/monitors-keyvault.tf @@ -4,11 +4,11 @@ resource "datadog_monitor" "keyvault_status" { name = "[${var.environment}] Key Vault is down" message = "${coalesce(var.status_message, var.message)}" - query = < ${var.api_latency_threshold_critical} - EOF + EOQ thresholds { critical = "${var.api_latency_threshold_critical}" diff --git a/cloud/azure/load-balancer/monitors-load-balancer.tf b/cloud/azure/load-balancer/monitors-load-balancer.tf index 8852925..4db10da 100644 --- a/cloud/azure/load-balancer/monitors-load-balancer.tf +++ b/cloud/azure/load-balancer/monitors-load-balancer.tf @@ -4,11 +4,11 @@ resource "datadog_monitor" "loadbalancer_status" { name = "[${var.environment}] Load Balancer is unreachable" message = "${coalesce(var.status_message, var.message)}" - query = < ${var.cpu_usage_threshold_critical} - EOF + EOQ type = "metric alert" @@ -36,11 +36,11 @@ resource "datadog_monitor" "mysql_free_storage" { name = "[${var.environment}] Mysql Server storage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.free_storage_message, var.message)}" - query = < ${var.io_consumption_threshold_critical} - EOF + EOQ type = "metric alert" @@ -102,11 +102,11 @@ resource "datadog_monitor" "mysql_memory_usage" { name = "[${var.environment}] Mysql Server memory usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.memory_usage_message, var.message)}" - query = < ${var.memory_usage_threshold_critical} - EOF + EOQ type = "metric alert" diff --git a/cloud/azure/postgresql/monitors-postegresql.tf b/cloud/azure/postgresql/monitors-postegresql.tf index d92f42d..3aa9cdd 100644 --- a/cloud/azure/postgresql/monitors-postegresql.tf +++ b/cloud/azure/postgresql/monitors-postegresql.tf @@ -3,11 +3,11 @@ resource "datadog_monitor" "postgresql_cpu_usage" { name = "[${var.environment}] Postgresql Server CPU usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.cpu_usage_message, var.message)}" - query = < ${var.cpu_usage_threshold_critical} - EOF + EOQ type = "metric alert" @@ -36,11 +36,11 @@ resource "datadog_monitor" "postgresql_no_connection" { name = "[${var.environment}] Postgresql Server has no connection" message = "${coalesce(var.no_connection_message, var.message)}" - query = < ${var.io_consumption_threshold_critical} - EOF + EOQ type = "metric alert" @@ -130,11 +130,11 @@ resource "datadog_monitor" "postgresql_memory_usage" { name = "[${var.environment}] Postgresql Server memory usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.memory_usage_message, var.message)}" - query = < ${var.memory_usage_threshold_critical} - EOF + EOQ type = "metric alert" diff --git a/cloud/azure/redis/monitors-azure-redis.tf b/cloud/azure/redis/monitors-azure-redis.tf index 3709b54..fd3242a 100644 --- a/cloud/azure/redis/monitors-azure-redis.tf +++ b/cloud/azure/redis/monitors-azure-redis.tf @@ -3,11 +3,11 @@ resource "datadog_monitor" "status" { name = "[${var.environment}] Redis {{name}} is down" message = "${coalesce(var.status_message, var.message)}" - query = < ${var.evictedkeys_limit_threshold_critical} -EOF + EOQ type = "metric alert" @@ -64,11 +64,11 @@ resource "datadog_monitor" "percent_processor_time" { name = "[${var.environment}] Redis processor time too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.percent_processor_time_message, var.message)}" - query = < ${var.percent_processor_time_threshold_critical} -EOF + EOQ type = "metric alert" @@ -97,11 +97,11 @@ resource "datadog_monitor" "server_load" { name = "[${var.environment}] Redis server load too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.server_load_rate_message, var.message)}" - query = < ${var.server_load_rate_threshold_critical} -EOF + EOQ type = "metric alert" diff --git a/cloud/azure/serverfarms/monitors-azure-serverfarms.tf b/cloud/azure/serverfarms/monitors-azure-serverfarms.tf index 2df06ab..7a52a0f 100644 --- a/cloud/azure/serverfarms/monitors-azure-serverfarms.tf +++ b/cloud/azure/serverfarms/monitors-azure-serverfarms.tf @@ -3,11 +3,11 @@ resource "datadog_monitor" "status" { name = "[${var.environment}] Serverfarm is down" message = "${coalesce(var.status_message, var.message)}" - query = < ${var.cpu_percentage_threshold_critical} - EOF + EOQ type = "metric alert" @@ -64,11 +64,11 @@ resource "datadog_monitor" "memory_percentage" { name = "[${var.environment}] Serverfarm memory percentage is too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.memory_percentage_message, var.message)}" - query = < ${var.memory_percentage_threshold_critical} - EOF + EOQ type = "metric alert" diff --git a/cloud/azure/servicebus/monitors-service-bus.tf b/cloud/azure/servicebus/monitors-service-bus.tf index e205ee6..f1bb8b4 100644 --- a/cloud/azure/servicebus/monitors-service-bus.tf +++ b/cloud/azure/servicebus/monitors-service-bus.tf @@ -4,11 +4,11 @@ resource "datadog_monitor" "servicebus_status" { name = "[${var.environment}] Service Bus is down" message = "${coalesce(var.status_message, var.message)}" - query = < ${var.user_errors_threshold_critical} - EOF + EOQ type = "metric alert" @@ -97,12 +97,12 @@ resource "datadog_monitor" "service_bus_server_errors" { name = "[${var.environment}] Service Bus server errors rate is high {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.server_errors_message, var.message)}" - query = < ${var.server_errors_threshold_critical} - EOF + EOQ type = "metric alert" diff --git a/cloud/azure/sql-database/monitors-sql-database-basics.tf b/cloud/azure/sql-database/monitors-sql-database-basics.tf index 3160e5f..e639e40 100644 --- a/cloud/azure/sql-database/monitors-sql-database-basics.tf +++ b/cloud/azure/sql-database/monitors-sql-database-basics.tf @@ -3,11 +3,11 @@ resource "datadog_monitor" "status" { name = "[${var.environment}] SQL Database is down" message = "${coalesce(var.status_message, var.message)}" - query = < ${var.cpu_threshold_critical} - EOF + EOQ type = "metric alert" @@ -65,11 +65,11 @@ resource "datadog_monitor" "sql-database_free_space_low" { type = "metric alert" - query = < ${var.diskspace_threshold_critical} - EOF + EOQ thresholds { warning = "${var.diskspace_threshold_warning}" @@ -98,11 +98,11 @@ resource "datadog_monitor" "sql-database_dtu_consumption_high" { type = "metric alert" - query = < ${var.dtu_threshold_critical} - EOF + EOQ thresholds { warning = "${var.dtu_threshold_warning}" @@ -131,11 +131,11 @@ resource "datadog_monitor" "sql-database_deadlocks_count" { type = "metric alert" - query = < ${var.deadlock_threshold_critical} - EOF + EOQ thresholds { critical = "${var.deadlock_threshold_critical}" diff --git a/cloud/azure/storage/monitors-azure-storage.tf b/cloud/azure/storage/monitors-azure-storage.tf index 0c1e022..7c027f8 100644 --- a/cloud/azure/storage/monitors-azure-storage.tf +++ b/cloud/azure/storage/monitors-azure-storage.tf @@ -3,11 +3,11 @@ resource "datadog_monitor" "availability" { name = "[${var.environment}] Azure Storage is down" message = "${coalesce(var.availability_message, var.message)}" - query = < ${var.latency_threshold_critical} -EOF + EOQ thresholds { critical = "${var.latency_threshold_critical}" @@ -99,11 +99,11 @@ resource "datadog_monitor" "timeout_error_requests" { name = "[${var.environment}] Azure Storage too many timeout errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.timeout_error_requests_message, var.message)}" - query = < ${var.timeout_error_requests_threshold_critical} -EOF + EOQ thresholds { critical = "${var.timeout_error_requests_threshold_critical}" @@ -131,11 +131,11 @@ resource "datadog_monitor" "network_error_requests" { name = "[${var.environment}] Azure Storage too many network errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.network_error_requests_message, var.message)}" - query = < ${var.network_error_requests_threshold_critical} -EOF + EOQ thresholds { critical = "${var.network_error_requests_threshold_critical}" @@ -163,11 +163,11 @@ resource "datadog_monitor" "throttling_error_requests" { name = "[${var.environment}] Azure Storage too many throttling errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.throttling_error_requests_message, var.message)}" - query = < ${var.throttling_error_requests_threshold_critical} -EOF + EOQ thresholds { critical = "${var.throttling_error_requests_threshold_critical}" @@ -195,11 +195,11 @@ resource "datadog_monitor" "server_other_error_requests" { name = "[${var.environment}] Azure Storage too many server_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.server_other_error_requests_message, var.message)}" - query = < ${var.server_other_error_requests_threshold_critical} -EOF + EOQ thresholds { critical = "${var.server_other_error_requests_threshold_critical}" @@ -227,11 +227,11 @@ resource "datadog_monitor" "client_other_error_requests" { name = "[${var.environment}] Azure Storage too many client_other errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.client_other_error_requests_message, var.message)}" - query = < ${var.client_other_error_requests_threshold_critical} -EOF + EOQ thresholds { critical = "${var.client_other_error_requests_threshold_critical}" @@ -259,11 +259,11 @@ resource "datadog_monitor" "authorization_error_requests" { name = "[${var.environment}] Azure Storage too many authorization errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.authorization_error_requests_message, var.message)}" - query = < ${var.authorization_error_requests_threshold_critical} -EOF + EOQ thresholds { critical = "${var.authorization_error_requests_threshold_critical}" diff --git a/cloud/azure/stream-analytics/monitors-stream-analytics.tf b/cloud/azure/stream-analytics/monitors-stream-analytics.tf index 549094e..1e62d78 100644 --- a/cloud/azure/stream-analytics/monitors-stream-analytics.tf +++ b/cloud/azure/stream-analytics/monitors-stream-analytics.tf @@ -3,11 +3,11 @@ resource "datadog_monitor" "status" { name = "[${var.environment}] Stream Analytics is down" message = "${coalesce(var.status_message, var.message)}" - query = < ${var.su_utilization_threshold_critical} - EOF + EOQ type = "metric alert" @@ -64,12 +64,12 @@ resource "datadog_monitor" "failed_function_requests" { name = "[${var.environment}] Stream Analytics too many failed requests {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.failed_function_requests_message, var.message)}" - query = < ${var.failed_function_requests_threshold_critical} - EOF + EOQ type = "metric alert" @@ -98,11 +98,11 @@ resource "datadog_monitor" "conversion_errors" { name = "[${var.environment}] Stream Analytics too many conversion errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.conversion_errors_message, var.message)}" - query = < ${var.conversion_errors_threshold_critical} - EOF + EOQ type = "metric alert" @@ -131,11 +131,11 @@ resource "datadog_monitor" "runtime_errors" { name = "[${var.environment}] Stream Analytics too many runtime errors {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = "${coalesce(var.runtime_errors_message, var.message)}" - query = < ${var.runtime_errors_threshold_critical} - EOF + EOQ type = "metric alert" diff --git a/cloud/azure/virtual-machine/monitors-virtual-machine.tf b/cloud/azure/virtual-machine/monitors-virtual-machine.tf index 29cba32..a25cfd7 100644 --- a/cloud/azure/virtual-machine/monitors-virtual-machine.tf +++ b/cloud/azure/virtual-machine/monitors-virtual-machine.tf @@ -4,11 +4,11 @@ resource "datadog_monitor" "virtualmachine_status" { name = "[${var.environment}] Virtual Machine is unreachable" message = "${coalesce(var.status_message, var.message)}" - query = < ${var.cpu_usage_threshold_critical} - EOF + EOQ type = "metric alert" @@ -65,14 +65,14 @@ resource "datadog_monitor" "virtualmachine_credit_cpu_remaining_too_low" { name = "[${var.environment}] Virtual Machine credit CPU {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.cpu_remaining_rate_message, var.message)}" - query = < ${var.concurrent_queries_threshold_critical} -EOF + EOQ thresholds { warning = "${var.concurrent_queries_threshold_warning}" @@ -44,10 +44,10 @@ resource "datadog_monitor" "execution_time" { type = "metric alert" - query = < ${var.execution_time_threshold_critical} -EOF + EOQ thresholds { warning = "${var.execution_time_threshold_warning}" @@ -80,10 +80,10 @@ resource "datadog_monitor" "scanned_bytes" { type = "metric alert" - query = < ${var.scanned_bytes_threshold_critical} -EOF + EOQ thresholds { warning = "${var.scanned_bytes_threshold_warning}" @@ -116,10 +116,10 @@ resource "datadog_monitor" "scanned_bytes_billed" { type = "metric alert" - query = < ${var.scanned_bytes_billed_threshold_critical} -EOF + EOQ thresholds { warning = "${var.scanned_bytes_billed_threshold_warning}" @@ -152,10 +152,10 @@ resource "datadog_monitor" "available_slots" { type = "metric alert" - query = < ${var.stored_bytes_threshold_critical} -EOF + EOQ thresholds { warning = "${var.stored_bytes_threshold_warning}" @@ -224,10 +224,10 @@ resource "datadog_monitor" "table_count" { type = "metric alert" - query = < ${var.table_count_threshold_critical} -EOF + EOQ thresholds { warning = "${var.table_count_threshold_warning}" @@ -260,10 +260,10 @@ resource "datadog_monitor" "uploaded_bytes" { type = "metric alert" - query = < ${var.uploaded_bytes_threshold_critical} -EOF + EOQ thresholds { warning = "${var.uploaded_bytes_threshold_warning}" @@ -296,10 +296,10 @@ resource "datadog_monitor" "uploaded_bytes_billed" { type = "metric alert" - query = < ${var.uploaded_bytes_billed_threshold_critical} -EOF + EOQ thresholds { warning = "${var.uploaded_bytes_billed_threshold_warning}" diff --git a/cloud/gcp/cloud-sql/common/monitors-cloud-sql-common.tf b/cloud/gcp/cloud-sql/common/monitors-cloud-sql-common.tf index 2b37bc2..6069ab7 100644 --- a/cloud/gcp/cloud-sql/common/monitors-cloud-sql-common.tf +++ b/cloud/gcp/cloud-sql/common/monitors-cloud-sql-common.tf @@ -8,12 +8,12 @@ resource "datadog_monitor" "cpu_utilization" { type = "metric alert" - query = < ${var.cpu_utilization_threshold_critical} -EOF + EOQ thresholds { warning = "${var.cpu_utilization_threshold_warning}" @@ -46,12 +46,12 @@ resource "datadog_monitor" "disk_utilization" { type = "metric alert" - query = < ${var.disk_utilization_threshold_critical} -EOF + EOQ thresholds { warning = "${var.disk_utilization_threshold_warning}" @@ -84,7 +84,7 @@ resource "datadog_monitor" "disk_utilization_forecast" { type = "metric alert" - query = <= ${var.disk_utilization_forecast_threshold_critical} -EOF + EOQ thresholds { critical = "${var.disk_utilization_forecast_threshold_critical}" @@ -128,12 +128,12 @@ resource "datadog_monitor" "memory_utilization" { type = "metric alert" - query = < ${var.memory_utilization_threshold_critical} -EOF + EOQ thresholds { warning = "${var.memory_utilization_threshold_warning}" @@ -166,7 +166,7 @@ resource "datadog_monitor" "memory_utilization_forecast" { type = "query alert" - query = <= ${var.memory_utilization_forecast_threshold_critical} -EOF + EOQ thresholds { critical = "${var.memory_utilization_forecast_threshold_critical}" @@ -210,12 +210,12 @@ resource "datadog_monitor" "failover_unavailable" { type = "metric alert" - query = < ${var.replication_lag_threshold_critical} -EOF + EOQ thresholds { critical = "${var.replication_lag_threshold_critical}" diff --git a/cloud/gcp/gce/instance/monitors-gce-instance.tf b/cloud/gcp/gce/instance/monitors-gce-instance.tf index fed557a..b3d1033 100644 --- a/cloud/gcp/gce/instance/monitors-gce-instance.tf +++ b/cloud/gcp/gce/instance/monitors-gce-instance.tf @@ -8,11 +8,11 @@ resource "datadog_monitor" "cpu_utilization" { type = "metric alert" - query = < ${var.cpu_utilization_threshold_critical} -EOF + EOQ thresholds { warning = "${var.cpu_utilization_threshold_warning}" @@ -45,7 +45,7 @@ resource "datadog_monitor" "disk_throttled_bps" { type = "metric alert" - query = < ${var.disk_throttled_bps_threshold_critical} -EOF + EOQ thresholds { warning = "${var.disk_throttled_bps_threshold_warning}" @@ -88,7 +88,7 @@ resource "datadog_monitor" "disk_throttled_ops" { type = "metric alert" - query = < ${var.disk_throttled_ops_threshold_critical} -EOF + EOQ thresholds { warning = "${var.disk_throttled_ops_threshold_warning}" diff --git a/cloud/gcp/lb/monitors-lb.tf b/cloud/gcp/lb/monitors-lb.tf index 0422812..bbef18e 100644 --- a/cloud/gcp/lb/monitors-lb.tf +++ b/cloud/gcp/lb/monitors-lb.tf @@ -8,12 +8,12 @@ resource "datadog_monitor" "error_rate_4xx" { type = "metric alert" - query = < ${var.error_rate_4xx_threshold_critical} -EOF + EOQ thresholds { warning = "${var.error_rate_4xx_threshold_warning}" @@ -46,12 +46,12 @@ resource "datadog_monitor" "error_rate_5xx" { type = "metric alert" - query = < ${var.error_rate_5xx_threshold_critical} -EOF + EOQ thresholds { warning = "${var.error_rate_5xx_threshold_warning}" @@ -84,11 +84,11 @@ resource "datadog_monitor" "backend_latency_service" { type = "metric alert" - query = < ${var.backend_latency_service_threshold_critical} -EOF + EOQ thresholds { warning = "${var.backend_latency_service_threshold_warning}" @@ -121,11 +121,11 @@ resource "datadog_monitor" "backend_latency_bucket" { type = "metric alert" - query = < ${var.backend_latency_bucket_threshold_critical} -EOF + EOQ thresholds { warning = "${var.backend_latency_bucket_threshold_warning}" @@ -158,11 +158,11 @@ resource "datadog_monitor" "request_count" { type = "query alert" - query = < ${var.request_count_threshold_critical} -EOF + EOQ thresholds { warning = "${var.request_count_threshold_warning}" diff --git a/cloud/gcp/pubsub/monitors-pubsub.tf b/cloud/gcp/pubsub/monitors-pubsub.tf index a364670..faa4b01 100644 --- a/cloud/gcp/pubsub/monitors-pubsub.tf +++ b/cloud/gcp/pubsub/monitors-pubsub.tf @@ -8,11 +8,11 @@ resource "datadog_monitor" "sending_operations_count" { type = "query alert" - query = <= ${var.unavailable_sending_operations_count_threshold_critical} -EOF + EOQ thresholds { warning = "${var.unavailable_sending_operations_count_threshold_warning}" diff --git a/database/elasticsearch/monitors-elasticsearch.tf b/database/elasticsearch/monitors-elasticsearch.tf index ecb599f..3607114 100644 --- a/database/elasticsearch/monitors-elasticsearch.tf +++ b/database/elasticsearch/monitors-elasticsearch.tf @@ -6,9 +6,9 @@ resource "datadog_monitor" "not_responding" { name = "[${var.environment}] ElasticSearch does not respond" message = "${coalesce(var.not_responding_message, var.message)}" - query = < ${var.cluster_initializing_shards_threshold_critical} -EOF + EOQ thresholds { warning = "${var.cluster_initializing_shards_threshold_warning}" @@ -136,11 +136,11 @@ resource "datadog_monitor" "cluster_relocating_shards" { type = "metric alert" - query = < ${var.cluster_relocating_shards_threshold_critical} -EOF + EOQ thresholds { warning = "${var.cluster_relocating_shards_threshold_warning}" @@ -178,11 +178,11 @@ resource "datadog_monitor" "cluster_unassigned_shards" { type = "metric alert" - query = < ${var.cluster_unassigned_shards_threshold_critical} -EOF + EOQ thresholds { warning = "${var.cluster_unassigned_shards_threshold_warning}" @@ -220,14 +220,14 @@ resource "datadog_monitor" "node_free_space" { type = "query alert" - query = < ${var.jvm_heap_memory_usage_threshold_critical} -EOF + EOQ thresholds { warning = "${var.jvm_heap_memory_usage_threshold_warning}" @@ -307,11 +307,11 @@ resource "datadog_monitor" "jvm_memory_young_usage" { type = "query alert" - query = < ${var.jvm_memory_young_usage_threshold_critical} -EOF + EOQ thresholds { warning = "${var.jvm_memory_young_usage_threshold_warning}" @@ -349,11 +349,11 @@ resource "datadog_monitor" "jvm_memory_old_usage" { type = "query alert" - query = < ${var.jvm_memory_old_usage_threshold_critical} -EOF + EOQ thresholds { warning = "${var.jvm_memory_old_usage_threshold_warning}" @@ -391,11 +391,11 @@ resource "datadog_monitor" "jvm_gc_old_collection_latency" { type = "query alert" - query = < ${var.jvm_gc_old_collection_latency_threshold_critical} -EOF + EOQ thresholds { warning = "${var.jvm_gc_old_collection_latency_threshold_warning}" @@ -433,11 +433,11 @@ resource "datadog_monitor" "jvm_gc_young_collection_latency" { type = "query alert" - query = < ${var.jvm_gc_young_collection_latency_threshold_critical} -EOF + EOQ thresholds { warning = "${var.jvm_gc_young_collection_latency_threshold_warning}" @@ -476,11 +476,11 @@ resource "datadog_monitor" "indexing_latency" { type = "query alert" // TODO add tags to filter by node type and do not apply this monitor on non-data nodes - query = < ${var.indexing_latency_threshold_critical} -EOF + EOQ thresholds { warning = "${var.indexing_latency_threshold_warning}" @@ -519,11 +519,11 @@ resource "datadog_monitor" "flush_latency" { type = "query alert" // TODO add tags to filter by node type and do not apply this monitor on non-data nodes - query = < ${var.flush_latency_threshold_critical} -EOF + EOQ thresholds { warning = "${var.flush_latency_threshold_warning}" @@ -561,7 +561,7 @@ resource "datadog_monitor" "http_connections_anomaly" { type = "query alert" - query = <= ${var.http_connections_anomaly_threshold_critical} -EOF + EOQ thresholds { warning = "${var.http_connections_anomaly_threshold_warning}" @@ -612,11 +612,11 @@ resource "datadog_monitor" "search_query_latency" { type = "query alert" // TODO add tags to filter by node type and do not apply this monitor on non-data nodes - query = < ${var.search_query_latency_threshold_critical} -EOF + EOQ thresholds { warning = "${var.search_query_latency_threshold_warning}" @@ -655,11 +655,11 @@ resource "datadog_monitor" "fetch_latency" { type = "query alert" // TODO add tags to filter by node type and do not apply this monitor on non-data nodes - query = < ${var.fetch_latency_threshold_critical} -EOF + EOQ thresholds { warning = "${var.fetch_latency_threshold_warning}" @@ -697,11 +697,11 @@ resource "datadog_monitor" "search_query_change" { type = "query alert" - query = <= ${var.search_query_change_threshold_critical} -EOF + EOQ thresholds { warning = "${var.search_query_change_threshold_warning}" @@ -739,11 +739,11 @@ resource "datadog_monitor" "fetch_change" { type = "query alert" - query = <= ${var.fetch_change_threshold_critical} -EOF + EOQ thresholds { warning = "${var.fetch_change_threshold_warning}" @@ -782,11 +782,11 @@ resource "datadog_monitor" "field_data_evictions_change" { type = "query alert" // TODO add tags to filter by node type and do not apply this monitor on non-data nodes - query = < ${var.field_data_evictions_change_threshold_critical} -EOF + EOQ thresholds { warning = "${var.field_data_evictions_change_threshold_warning}" @@ -825,11 +825,11 @@ resource "datadog_monitor" "query_cache_evictions_change" { type = "query alert" // TODO add tags to filter by node type and do not apply this monitor on non-data nodes - query = < ${var.query_cache_evictions_change_threshold_critical} -EOF + EOQ thresholds { warning = "${var.query_cache_evictions_change_threshold_warning}" @@ -868,11 +868,11 @@ resource "datadog_monitor" "request_cache_evictions_change" { type = "query alert" // TODO add tags to filter by node type and do not apply this monitor on non-data nodes - query = < ${var.request_cache_evictions_change_threshold_critical} -EOF + EOQ thresholds { warning = "${var.request_cache_evictions_change_threshold_warning}" @@ -910,11 +910,11 @@ resource "datadog_monitor" "task_time_in_queue_change" { type = "query alert" - query = < ${var.task_time_in_queue_change_threshold_critical} -EOF + EOQ thresholds { warning = "${var.task_time_in_queue_change_threshold_warning}" diff --git a/database/mongodb/monitors-mongo.tf b/database/mongodb/monitors-mongo.tf index 992a042..054bba5 100644 --- a/database/mongodb/monitors-mongo.tf +++ b/database/mongodb/monitors-mongo.tf @@ -3,10 +3,10 @@ resource "datadog_monitor" "mongodb_primary" { name = "[${var.environment}] MongoDB primary state" message = "${coalesce(var.mongodb_primary_message, var.message)}" - query = <= 2 - EOF + EOQ type = "metric alert" @@ -29,12 +29,12 @@ resource "datadog_monitor" "mongodb_secondary" { name = "[${var.environment}] MongoDB secondary missing" message = "${coalesce(var.mongodb_secondary_message, var.message)}" - query = < 1 - EOF + EOQ thresholds { critical = 1 @@ -62,11 +62,11 @@ resource "datadog_monitor" "mongodb_server_count" { name = "[${var.environment}] MongoDB too much servers or wrong monitoring config" message = "${coalesce(var.mongodb_server_count_message, var.message)}" - query = < 99 - EOF + EOQ thresholds { critical = 99 @@ -94,10 +94,10 @@ resource "datadog_monitor" "mongodb_replication" { name = "[${var.environment}] MongoDB replication lag" message = "${coalesce(var.mongodb_replication_message, var.message)}" - query = < ${var.mongodb_lag_critical} - EOF + EOQ thresholds { critical = "${var.mongodb_lag_critical}" diff --git a/database/mysql/monitors-mysql.tf b/database/mysql/monitors-mysql.tf index acbe571..a5c8950 100644 --- a/database/mysql/monitors-mysql.tf +++ b/database/mysql/monitors-mysql.tf @@ -5,9 +5,9 @@ resource "datadog_monitor" "mysql_availability" { type = "service check" - query = < ${var.mysql_connection_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -67,12 +67,12 @@ resource "datadog_monitor" "mysql_aborted" { message = "${coalesce(var.mysql_aborted_message, var.message)}" type = "metric alert" - query = < ${var.mysql_aborted_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -99,12 +99,12 @@ resource "datadog_monitor" "mysql_slow" { message = "${coalesce(var.mysql_slow_message, var.message)}" type = "metric alert" - query = < ${var.mysql_slow_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -131,12 +131,12 @@ resource "datadog_monitor" "mysql_pool_efficiency" { message = "${coalesce(var.mysql_pool_efficiency_message, var.message)}" type = "metric alert" - query = < ${var.mysql_pool_efficiency_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -163,13 +163,13 @@ resource "datadog_monitor" "mysql_pool_utilization" { message = "${coalesce(var.mysql_pool_utilization_message, var.message)}" type = "metric alert" - query = < ${var.mysql_pool_utilization_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -196,7 +196,7 @@ resource "datadog_monitor" "mysql_threads_anomaly" { message = "${coalesce(var.mysql_threads_message, var.message)}" type = "metric alert" - query = <= ${var.mysql_threads_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -236,7 +236,7 @@ resource "datadog_monitor" "mysql_questions_anomaly" { message = "${coalesce(var.mysql_questions_message, var.message)}" type = "metric alert" - query = <= ${var.mysql_questions_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" diff --git a/database/postgresql/monitors-postgresql.tf b/database/postgresql/monitors-postgresql.tf index f18b7a8..ce8907c 100644 --- a/database/postgresql/monitors-postgresql.tf +++ b/database/postgresql/monitors-postgresql.tf @@ -5,9 +5,9 @@ resource "datadog_monitor" "postgresql_availability" { type = "service check" - query = < ${var.postgresql_connection_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" @@ -66,11 +66,11 @@ resource "datadog_monitor" "postgresql_too_many_locks" { message = "${coalesce(var.postgresql_lock_message, var.message)}" type = "metric alert" - query = < ${var.postgresql_lock_threshold_critical} - EOF + EOQ evaluation_delay = "${var.evaluation_delay}" new_host_delay = "${var.new_host_delay}" diff --git a/database/redis/monitors-redis.tf b/database/redis/monitors-redis.tf index e948467..6fe3856 100644 --- a/database/redis/monitors-redis.tf +++ b/database/redis/monitors-redis.tf @@ -8,9 +8,9 @@ resource "datadog_monitor" "not_responding" { type = "service check" - query = < ${var.evictedkeys_change_threshold_critical} -EOL + EOQ type = "metric alert" @@ -71,11 +71,11 @@ resource "datadog_monitor" "expirations" { name = "[${var.environment}] Redis expired keys {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.expirations_rate_message, var.message)}" - query = < ${var.expirations_rate_threshold_critical} -EOL + EOQ type = "metric alert" @@ -104,12 +104,12 @@ resource "datadog_monitor" "blocked_clients" { name = "[${var.environment}] Redis blocked clients {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.blocked_clients_message, var.message)}" - query = < ${var.blocked_clients_threshold_critical} -EOL + EOQ type = "metric alert" @@ -138,11 +138,11 @@ resource "datadog_monitor" "keyspace_full" { name = "[${var.environment}] Redis keyspace seems full (no changes since ${var.keyspace_timeframe})" message = "${coalesce(var.keyspace_message, var.message)}" - query = < ${var.mem_used_threshold_critical} -EOL + EOQ type = "metric alert" @@ -205,11 +205,11 @@ resource "datadog_monitor" "memory_frag" { name = "[${var.environment}] Redis memory fragmented {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.mem_frag_message, var.message)}" - query = < ${var.mem_frag_threshold_critical} -EOL + EOQ type = "metric alert" @@ -238,11 +238,11 @@ resource "datadog_monitor" "rejected_connections" { name = "[${var.environment}] Redis rejected connections {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = "${coalesce(var.rejected_con_message, var.message)}" - query = < ${var.rejected_con_threshold_critical} -EOL + EOQ type = "metric alert" @@ -271,11 +271,11 @@ resource "datadog_monitor" "latency" { name = "[${var.environment}] Redis latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}){{/is_warning}}" message = "${coalesce(var.latency_message, var.message)}" - query = < ${var.latency_threshold_critical} -EOL + EOQ type = "metric alert" @@ -304,13 +304,13 @@ resource "datadog_monitor" "hitrate" { name = "[${var.environment}] Redis hitrate {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.hitrate_message, var.message)}" - query = < ${var.nginx_dropped_threshold_critical} + EOQ thresholds { critical = "${var.nginx_dropped_threshold_critical}" diff --git a/middleware/php-fpm/monitors-fpm.tf b/middleware/php-fpm/monitors-fpm.tf index f23845c..537b65b 100644 --- a/middleware/php-fpm/monitors-fpm.tf +++ b/middleware/php-fpm/monitors-fpm.tf @@ -5,9 +5,9 @@ resource "datadog_monitor" "php_fpm_connect" { type = "service check" - query = < ${var.php_fpm_busy_threshold_critical} - EOF + EOQ thresholds { warning = "${var.php_fpm_busy_threshold_warning}" diff --git a/system/generic/monitors-system.tf b/system/generic/monitors-system.tf index ab528f4..62ff489 100644 --- a/system/generic/monitors-system.tf +++ b/system/generic/monitors-system.tf @@ -3,11 +3,11 @@ resource "datadog_monitor" "cpu" { name = "[${var.environment}] CPU usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.cpu_message, var.message)}" - query = < ${var.cpu_threshold_critical} - EOF + EOQ type = "metric alert" @@ -35,11 +35,11 @@ resource "datadog_monitor" "load" { name = "[${var.environment}] CPU load 5 ratio {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = "${coalesce(var.load_message, var.message)}" - query = < ${var.load_threshold_critical} - EOF + EOQ type = "metric alert" @@ -67,11 +67,11 @@ resource "datadog_monitor" "disk_space" { name = "[${var.environment}] Disk space usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.disk_space_message, var.message)}" - query = < ${var.disk_space_threshold_critical} - EOF + EOQ type = "metric alert" @@ -99,7 +99,7 @@ resource "datadog_monitor" "disk_space_forecast" { name = "[${var.environment}] Disk Space usage could reach {{#is_alert}}{{threshold}}%{{/is_alert}} in a near future" message = "${coalesce(var.disk_space_forecast_message, var.message)}" - query = <= ${var.disk_space_forecast_threshold_critical} - EOF + EOQ type = "query alert" @@ -139,11 +139,11 @@ resource "datadog_monitor" "disk_inodes" { name = "[${var.environment}] Disk inodes usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.disk_inodes_message, var.message)}" - query = < ${var.disk_inodes_threshold_critical} - EOF + EOQ type = "metric alert" @@ -171,12 +171,12 @@ resource "datadog_monitor" "memory" { name = "[${var.environment}] Usable Memory {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${var.memory_message}" - query = <