From 88ae2f4c51fea8199101fbfafc24c0a5337de8b0 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Fri, 23 Mar 2018 23:10:18 +0100 Subject: [PATCH 1/7] MON-96 fix all delay naming and default value --- cloud/aws/elasticsearch/README.md | 2 +- cloud/aws/elasticsearch/inputs.tf | 2 +- cloud/aws/elb/README.md | 2 +- cloud/aws/elb/inputs.tf | 4 +- cloud/aws/elb/monitors-elb.tf | 24 +++---- cloud/aws/rds/README.md | 2 +- cloud/aws/rds/inputs.tf | 4 +- cloud/aws/rds/monitors-rds.tf | 8 +-- cloud/aws/vpn/README.md | 2 +- cloud/aws/vpn/inputs.tf | 4 +- cloud/aws/vpn/monitors-vpn.tf | 4 +- cloud/azure/README.md | 2 +- cloud/azure/apimanagement/README.md | 2 +- cloud/azure/apimanagement/inputs.tf | 2 +- cloud/azure/app-services/README.md | 2 +- cloud/azure/app-services/inputs.tf | 2 +- cloud/azure/eventhub/README.md | 2 +- cloud/azure/eventhub/inputs.tf | 2 +- cloud/azure/inputs.tf | 2 +- cloud/azure/iothubs/README.md | 2 +- cloud/azure/iothubs/inputs.tf | 2 +- cloud/azure/redis/README.md | 2 +- cloud/azure/redis/inputs.tf | 2 +- cloud/azure/sql-database/README.md | 2 +- cloud/azure/sql-database/inputs.tf | 2 +- cloud/azure/storage/README.md | 2 +- cloud/azure/storage/inputs.tf | 2 +- cloud/azure/stream-analytics/README.md | 2 +- cloud/azure/stream-analytics/inputs.tf | 2 +- databases/mongodb/README.md | 2 +- databases/mongodb/inputs.tf | 2 +- databases/mongodb/monitors-mongo.tf | 4 +- inputs.tf | 98 -------------------------- middleware/apache/README.md | 6 +- middleware/apache/inputs.tf | 2 +- middleware/apache/monitors-apache.tf | 4 +- middleware/nginx/README.md | 6 +- middleware/nginx/inputs.tf | 2 +- middleware/nginx/monitors-nginx.tf | 4 +- middleware/php-fpm/README.md | 7 +- middleware/php-fpm/inputs.tf | 7 +- middleware/php-fpm/monitors-fpm.tf | 8 +-- system/generic/README.md | 2 +- system/generic/inputs.tf | 4 +- system/generic/monitors-system.tf | 16 ++--- 45 files changed, 82 insertions(+), 186 deletions(-) delete mode 100644 inputs.tf diff --git a/cloud/aws/elasticsearch/README.md b/cloud/aws/elasticsearch/README.md index 8fb4da9..d42d1cf 100644 --- a/cloud/aws/elasticsearch/README.md +++ b/cloud/aws/elasticsearch/README.md @@ -33,7 +33,7 @@ Inputs | cpu_silenced | Groups to mute for ES cluster cpu monitor | map | `` | no | | cpu_threshold_critical | CPU usage in percent (critical threshold) | string | `90` | no | | cpu_threshold_warning | CPU usage in percent (warning threshold) | string | `80` | no | -| delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | no | | diskspace_message | Custom message for ES cluster diskspace monitor | string | `` | no | | diskspace_silenced | Groups to mute for ES cluster diskspace monitor | map | `` | no | | diskspace_threshold_critical | Disk free space in percent (critical threshold) | string | `10` | no | diff --git a/cloud/aws/elasticsearch/inputs.tf b/cloud/aws/elasticsearch/inputs.tf index fda0cee..55b26c5 100644 --- a/cloud/aws/elasticsearch/inputs.tf +++ b/cloud/aws/elasticsearch/inputs.tf @@ -7,7 +7,7 @@ variable "environment" { # Global DataDog variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } variable "message" { diff --git a/cloud/aws/elb/README.md b/cloud/aws/elb/README.md index f3e5da5..78e54c5 100644 --- a/cloud/aws/elb/README.md +++ b/cloud/aws/elb/README.md @@ -54,7 +54,7 @@ Inputs | elb_no_healthy_instance_message | Custom message for ELB no healty instance monitor | string | `` | no | | elb_no_healthy_instance_silenced | Groups to mute for ELB no healty instance monitor | map | `` | no | | environment | Architecture Environment | string | - | yes | -| evaluation_delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when an alert is triggered | string | - | yes | \ No newline at end of file diff --git a/cloud/aws/elb/inputs.tf b/cloud/aws/elb/inputs.tf index 53f122b..ef88673 100644 --- a/cloud/aws/elb/inputs.tf +++ b/cloud/aws/elb/inputs.tf @@ -5,9 +5,9 @@ variable "environment" { } # Global DataDog -variable "evaluation_delay" { +variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } variable "message" { diff --git a/cloud/aws/elb/monitors-elb.tf b/cloud/aws/elb/monitors-elb.tf index fc12fa5..79ab870 100644 --- a/cloud/aws/elb/monitors-elb.tf +++ b/cloud/aws/elb/monitors-elb.tf @@ -19,14 +19,14 @@ resource "datadog_monitor" "ELB_no_healthy_instances" { type = "metric alert" notify_no_data = true - evaluation_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false - new_host_delay = "${var.evaluation_delay}" + new_host_delay = "${var.delay}" no_data_timeframe = 20 silenced = "${var.elb_no_healthy_instance_silenced}" @@ -55,14 +55,14 @@ resource "datadog_monitor" "ELB_too_much_4xx" { } notify_no_data = false - evaluation_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false - new_host_delay = "${var.evaluation_delay}" + new_host_delay = "${var.delay}" no_data_timeframe = 20 silenced = "${var.elb_4xx_silenced}" @@ -91,14 +91,14 @@ resource "datadog_monitor" "ELB_too_much_5xx" { } notify_no_data = false - evaluation_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false - new_host_delay = "${var.evaluation_delay}" + new_host_delay = "${var.delay}" no_data_timeframe = 20 silenced = "${var.elb_5xx_silenced}" @@ -127,14 +127,14 @@ resource "datadog_monitor" "ELB_too_much_4xx_backend" { } notify_no_data = false - evaluation_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false - new_host_delay = "${var.evaluation_delay}" + new_host_delay = "${var.delay}" no_data_timeframe = 20 silenced = "${var.elb_backend_4xx_silenced}" @@ -163,14 +163,14 @@ resource "datadog_monitor" "ELB_too_much_5xx_backend" { } notify_no_data = false - evaluation_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false - new_host_delay = "${var.evaluation_delay}" + new_host_delay = "${var.delay}" no_data_timeframe = 20 silenced = "${var.elb_backend_5xx_silenced}" @@ -196,14 +196,14 @@ resource "datadog_monitor" "ELB_backend_latency" { } notify_no_data = false - evaluation_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false - new_host_delay = "${var.evaluation_delay}" + new_host_delay = "${var.delay}" no_data_timeframe = 20 silenced = "${var.elb_backend_latency_silenced}" diff --git a/cloud/aws/rds/README.md b/cloud/aws/rds/README.md index 737f08e..c3eaa1d 100644 --- a/cloud/aws/rds/README.md +++ b/cloud/aws/rds/README.md @@ -34,7 +34,7 @@ Inputs | diskspace_threshold_critical | Disk free space in percent (critical threshold) | string | `10` | no | | diskspace_threshold_warning | Disk free space in percent (warning threshold) | string | `20` | no | | environment | Architecture Environment | string | - | yes | -| evaluation_delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when an alert is triggered | string | - | yes | diff --git a/cloud/aws/rds/inputs.tf b/cloud/aws/rds/inputs.tf index 7795cad..d651b09 100644 --- a/cloud/aws/rds/inputs.tf +++ b/cloud/aws/rds/inputs.tf @@ -5,9 +5,9 @@ variable "environment" { } # Global DataDog -variable "evaluation_delay" { +variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } variable "message" { diff --git a/cloud/aws/rds/monitors-rds.tf b/cloud/aws/rds/monitors-rds.tf index deaf9aa..e39aa64 100644 --- a/cloud/aws/rds/monitors-rds.tf +++ b/cloud/aws/rds/monitors-rds.tf @@ -25,13 +25,13 @@ EOF } notify_no_data = true - evaluation_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false - new_host_delay = "${var.evaluation_delay}" + new_host_delay = "${var.delay}" no_data_timeframe = 20 silenced = "${var.cpu_silenced}" @@ -59,13 +59,13 @@ EOF } notify_no_data = true - evaluation_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false - new_host_delay = "${var.evaluation_delay}" + new_host_delay = "${var.delay}" no_data_timeframe = 20 silenced = "${var.diskspace_silenced}" diff --git a/cloud/aws/vpn/README.md b/cloud/aws/vpn/README.md index 0bae76f..ddb69b6 100644 --- a/cloud/aws/vpn/README.md +++ b/cloud/aws/vpn/README.md @@ -25,7 +25,7 @@ Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| | environment | Architecture Environment | string | - | yes | -| evaluation_delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when an alert is triggered | string | - | yes | diff --git a/cloud/aws/vpn/inputs.tf b/cloud/aws/vpn/inputs.tf index ba86c7a..7e9f468 100644 --- a/cloud/aws/vpn/inputs.tf +++ b/cloud/aws/vpn/inputs.tf @@ -5,9 +5,9 @@ variable "environment" { } # Global DataDog -variable "evaluation_delay" { +variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } variable "message" { diff --git a/cloud/aws/vpn/monitors-vpn.tf b/cloud/aws/vpn/monitors-vpn.tf index 4c36b9c..8a3cddb 100644 --- a/cloud/aws/vpn/monitors-vpn.tf +++ b/cloud/aws/vpn/monitors-vpn.tf @@ -20,8 +20,8 @@ resource "datadog_monitor" "VPN_status" { notify_no_data = true renotify_interval = 0 - evaluation_delay = "${var.evaluation_delay}" - new_host_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" + new_host_delay = "${var.delay}" notify_audit = false timeout_h = 0 include_tags = true diff --git a/cloud/azure/README.md b/cloud/azure/README.md index 06c0fcf..af91db8 100644 --- a/cloud/azure/README.md +++ b/cloud/azure/README.md @@ -69,7 +69,7 @@ Inputs | appservices_response_time_silenced | Groups to mute for App Services response time monitor | map | `` | no | | appservices_response_time_threshold_critical | Alerting threshold for response time in seconds | string | `10` | no | | appservices_response_time_threshold_warning | Warning threshold for response time in seconds | string | `5` | no | -| delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | no | | environment | Architecture environment | string | - | yes | | eventhub_errors_rate_message | Custom message for Event Hub errors monitor | string | `` | no | | eventhub_errors_rate_silenced | Groups to mute for Event Hub errors monitor | map | `` | no | diff --git a/cloud/azure/apimanagement/README.md b/cloud/azure/apimanagement/README.md index 1fdf321..f08ce97 100644 --- a/cloud/azure/apimanagement/README.md +++ b/cloud/azure/apimanagement/README.md @@ -27,7 +27,7 @@ Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | no | | environment | Architecture environment | string | - | yes | | failed_requests_message | Custom message for API Management failed requests monitor | string | `` | no | | failed_requests_silenced | Groups to mute for API Management failed requests monitor | map | `` | no | diff --git a/cloud/azure/apimanagement/inputs.tf b/cloud/azure/apimanagement/inputs.tf index 85d1b0a..b006f1e 100644 --- a/cloud/azure/apimanagement/inputs.tf +++ b/cloud/azure/apimanagement/inputs.tf @@ -11,7 +11,7 @@ variable "message" { variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } variable "filter_tags_use_defaults" { diff --git a/cloud/azure/app-services/README.md b/cloud/azure/app-services/README.md index 6f632bf..2a9838d 100644 --- a/cloud/azure/app-services/README.md +++ b/cloud/azure/app-services/README.md @@ -28,7 +28,7 @@ Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | no | | environment | Architecture environment | string | - | yes | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | diff --git a/cloud/azure/app-services/inputs.tf b/cloud/azure/app-services/inputs.tf index 25ca97c..dd2a9fa 100644 --- a/cloud/azure/app-services/inputs.tf +++ b/cloud/azure/app-services/inputs.tf @@ -19,7 +19,7 @@ variable "message" { variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } # Azure App Services specific variables diff --git a/cloud/azure/eventhub/README.md b/cloud/azure/eventhub/README.md index 1c9ecf6..7f2ac9b 100644 --- a/cloud/azure/eventhub/README.md +++ b/cloud/azure/eventhub/README.md @@ -27,7 +27,7 @@ Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | no | | environment | Architecture environment | string | - | yes | | 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 | diff --git a/cloud/azure/eventhub/inputs.tf b/cloud/azure/eventhub/inputs.tf index 77180f0..707a293 100644 --- a/cloud/azure/eventhub/inputs.tf +++ b/cloud/azure/eventhub/inputs.tf @@ -11,7 +11,7 @@ variable "message" { variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } variable "filter_tags_use_defaults" { diff --git a/cloud/azure/inputs.tf b/cloud/azure/inputs.tf index a2b8f30..06f73a2 100644 --- a/cloud/azure/inputs.tf +++ b/cloud/azure/inputs.tf @@ -10,7 +10,7 @@ variable "message" { variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } variable "filter_tags_use_defaults" { diff --git a/cloud/azure/iothubs/README.md b/cloud/azure/iothubs/README.md index ec006c7..e4618be 100644 --- a/cloud/azure/iothubs/README.md +++ b/cloud/azure/iothubs/README.md @@ -38,7 +38,7 @@ Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | no | | dropped_d2c_telemetry_egress_message | Custom message for IoT Hub dropped d2c telemetry monitor | string | `` | no | | dropped_d2c_telemetry_egress_rate_threshold_critical | D2C Telemetry Dropped limit (critical threshold) | string | `90` | no | | dropped_d2c_telemetry_egress_rate_threshold_warning | D2C Telemetry Dropped limit (warning threshold) | string | `50` | no | diff --git a/cloud/azure/iothubs/inputs.tf b/cloud/azure/iothubs/inputs.tf index 9df407d..e58f862 100644 --- a/cloud/azure/iothubs/inputs.tf +++ b/cloud/azure/iothubs/inputs.tf @@ -7,7 +7,7 @@ variable "environment" { # Global DataDog variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } variable "message" { diff --git a/cloud/azure/redis/README.md b/cloud/azure/redis/README.md index bcdc3cb..a6b0883 100644 --- a/cloud/azure/redis/README.md +++ b/cloud/azure/redis/README.md @@ -27,7 +27,7 @@ Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | no | | environment | Architecture environment | string | - | yes | | 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 | diff --git a/cloud/azure/redis/inputs.tf b/cloud/azure/redis/inputs.tf index bf637f5..11725bc 100644 --- a/cloud/azure/redis/inputs.tf +++ b/cloud/azure/redis/inputs.tf @@ -11,7 +11,7 @@ variable "message" { variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } variable "filter_tags_use_defaults" { diff --git a/cloud/azure/sql-database/README.md b/cloud/azure/sql-database/README.md index 5882553..1291389 100644 --- a/cloud/azure/sql-database/README.md +++ b/cloud/azure/sql-database/README.md @@ -34,7 +34,7 @@ Inputs | 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 | -| delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | 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 | diff --git a/cloud/azure/sql-database/inputs.tf b/cloud/azure/sql-database/inputs.tf index 1d6d472..9f6d6b8 100644 --- a/cloud/azure/sql-database/inputs.tf +++ b/cloud/azure/sql-database/inputs.tf @@ -7,7 +7,7 @@ variable "environment" { # Global DataDog variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } variable "message" { diff --git a/cloud/azure/storage/README.md b/cloud/azure/storage/README.md index 91b48f1..65942eb 100644 --- a/cloud/azure/storage/README.md +++ b/cloud/azure/storage/README.md @@ -44,7 +44,7 @@ Inputs | client_other_error_requests_silenced | Groups to mute for Storage other errors monitor | map | `` | no | | client_other_error_requests_threshold_critical | Maximum acceptable percent of client other error requests for a storage | string | `90` | no | | client_other_error_requests_threshold_warning | Warning regarding acceptable percent of client other error requests for a storage | string | `50` | no | -| delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | no | | environment | Architecture environment | string | - | yes | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | diff --git a/cloud/azure/storage/inputs.tf b/cloud/azure/storage/inputs.tf index 6401007..bcfd4d9 100644 --- a/cloud/azure/storage/inputs.tf +++ b/cloud/azure/storage/inputs.tf @@ -11,7 +11,7 @@ variable "message" { variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } variable "filter_tags_use_defaults" { diff --git a/cloud/azure/stream-analytics/README.md b/cloud/azure/stream-analytics/README.md index 0c5e1c9..2ae73f9 100644 --- a/cloud/azure/stream-analytics/README.md +++ b/cloud/azure/stream-analytics/README.md @@ -23,7 +23,7 @@ Inputs | conversion_errors_silenced | Groups to mute for Stream Analytics conversion errors monitor | map | `` | no | | conversion_errors_threshold_critical | Conversion errors limit (critical threshold) | string | `10` | no | | conversion_errors_threshold_warning | Conversion errors limit (warning threshold) | string | `0` | no | -| delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `900` | no | | environment | Architecture environment | string | - | yes | | failed_function_requests_message | Custom message for Stream Analytics failed requests monitor | string | `` | no | | failed_function_requests_silenced | Groups to mute for Stream Analytics failed requests monitor | map | `` | no | diff --git a/cloud/azure/stream-analytics/inputs.tf b/cloud/azure/stream-analytics/inputs.tf index cc1f969..4f4cdce 100644 --- a/cloud/azure/stream-analytics/inputs.tf +++ b/cloud/azure/stream-analytics/inputs.tf @@ -11,7 +11,7 @@ variable "message" { variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 900 } variable "filter_tags_use_defaults" { diff --git a/databases/mongodb/README.md b/databases/mongodb/README.md index 1828671..f71378f 100644 --- a/databases/mongodb/README.md +++ b/databases/mongodb/README.md @@ -75,7 +75,7 @@ Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| | environment | Architecture Environment | string | - | yes | -| evaluation_delay | Delay in seconds for the metric evaluation | string | `15` | no | +| delay | Delay in seconds for the metric evaluation | string | `15` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when an alert is triggered | string | - | yes | diff --git a/databases/mongodb/inputs.tf b/databases/mongodb/inputs.tf index e526871..091d746 100644 --- a/databases/mongodb/inputs.tf +++ b/databases/mongodb/inputs.tf @@ -5,7 +5,7 @@ variable "environment" { } # Global DataDog -variable "evaluation_delay" { +variable "delay" { description = "Delay in seconds for the metric evaluation" default = 15 } diff --git a/databases/mongodb/monitors-mongo.tf b/databases/mongodb/monitors-mongo.tf index 1c06c51..6e4fd1a 100644 --- a/databases/mongodb/monitors-mongo.tf +++ b/databases/mongodb/monitors-mongo.tf @@ -20,8 +20,8 @@ resource "datadog_monitor" "mongodb_replicaset_state" { notify_no_data = true renotify_interval = 0 - evaluation_delay = "${var.evaluation_delay}" - new_host_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" + new_host_delay = "${var.delay}" notify_audit = false timeout_h = 0 include_tags = true diff --git a/inputs.tf b/inputs.tf deleted file mode 100644 index 7b6b527..0000000 --- a/inputs.tf +++ /dev/null @@ -1,98 +0,0 @@ -variable "hno_escalation_group" {} -variable "ho_escalation_group" {} - -variable env {} -variable region {} - -##linux -variable "dd_system" { - default = "disabled" -} - -variable "linux_basics_config" { - type = "map" - - default = { - notify_no_data = false - delay = 900 - } -} - -variable "dd_custom_cpu" { - type = "map" - - default = { - status = "disabled" - } -} - -#cpu threshold - -variable "cpu_5_critical" { - default = 95 -} - -variable "cpu_15_critical" { - default = 80 -} - -## RDS -variable "dd_aws_rds" { - default = "disabled" -} - -variable "rds_config" { - type = "map" - - default = { - notify_no_data = false - delay = 900 - } -} - -variable "rds_cpu_threshold" { - type = "map" - - default = { - warning = 80 - critical = 90 - } -} - -variable "rds_mem_threshold" { - default = { - warning = 20 - critical = 10 - } -} - -##apache nginx php -variable "dd_nginx" { - default = "disabled" -} - -variable "dd_php_fpm" { - default = "disabled" -} - -variable "dd_apache" { - default = "disabled" -} - -variable "apache_nginx_fpm_config" { - type = "map" - - default = { - notify_no_data = false - delay = 900 - } -} - -variable "php_fpm_busy_threshold" { - type = "map" - - default = { - warning = 0.8 - critical = 0.9 - } -} diff --git a/middleware/apache/README.md b/middleware/apache/README.md index d3f5010..100631e 100644 --- a/middleware/apache/README.md +++ b/middleware/apache/README.md @@ -17,7 +17,7 @@ Purpose ------- Creates a DataDog monitors with the following checks : -* Apache process +* Apache connect Inputs ------ @@ -26,8 +26,8 @@ Inputs |------|-------------|:----:|:-----:|:-----:| | apache_connect_message | Custom message for Apache process monitor | string | `` | no | | apache_connect_silenced | Groups to mute for Apache process monitor | map | `` | no | +| delay | Delay in seconds for the metric evaluation | string | `15` | no | | environment | Architecture Environment | string | - | yes | -| evaluation_delay | Delay in seconds for the metric evaluation | string | `15` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | -| message | Message sent when an alert is triggered | string | - | yes | \ No newline at end of file +| message | Message sent when an alert is triggered | string | - | yes | diff --git a/middleware/apache/inputs.tf b/middleware/apache/inputs.tf index d300534..400d637 100644 --- a/middleware/apache/inputs.tf +++ b/middleware/apache/inputs.tf @@ -5,7 +5,7 @@ variable "environment" { } # Global DataDog -variable "evaluation_delay" { +variable "delay" { description = "Delay in seconds for the metric evaluation" default = 15 } diff --git a/middleware/apache/monitors-apache.tf b/middleware/apache/monitors-apache.tf index 3406d3b..445a6b2 100644 --- a/middleware/apache/monitors-apache.tf +++ b/middleware/apache/monitors-apache.tf @@ -23,8 +23,8 @@ resource "datadog_monitor" "datadog_apache_process" { } notify_no_data = true - evaluation_delay = "${var.evaluation_delay}" - new_host_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" + new_host_delay = "${var.delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 diff --git a/middleware/nginx/README.md b/middleware/nginx/README.md index 344d744..90935cd 100644 --- a/middleware/nginx/README.md +++ b/middleware/nginx/README.md @@ -17,7 +17,7 @@ Purpose ------- Creates a DataDog monitors with the following checks : -* Nginx process +* Nginx connect Inputs ------ @@ -25,9 +25,9 @@ Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| | environment | Architecture Environment | string | - | yes | -| evaluation_delay | Delay in seconds for the metric evaluation | string | `15` | no | +| delay | Delay in seconds for the metric evaluation | string | `15` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when an alert is triggered | string | - | yes | | nginx_connect_message | Custom message for Nginx process monitor | string | `` | no | -| nginx_connect_silenced | Groups to mute for Nginx process monitor | map | `` | no | \ No newline at end of file +| nginx_connect_silenced | Groups to mute for Nginx process monitor | map | `` | no | diff --git a/middleware/nginx/inputs.tf b/middleware/nginx/inputs.tf index b4ca2f7..7370f6e 100644 --- a/middleware/nginx/inputs.tf +++ b/middleware/nginx/inputs.tf @@ -5,7 +5,7 @@ variable "environment" { } # Global DataDog -variable "evaluation_delay" { +variable "delay" { description = "Delay in seconds for the metric evaluation" default = 15 } diff --git a/middleware/nginx/monitors-nginx.tf b/middleware/nginx/monitors-nginx.tf index b578fca..033bd87 100644 --- a/middleware/nginx/monitors-nginx.tf +++ b/middleware/nginx/monitors-nginx.tf @@ -23,8 +23,8 @@ resource "datadog_monitor" "datadog_nginx_process" { } notify_no_data = true - evaluation_delay = "${var.evaluation_delay}" - new_host_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" + new_host_delay = "${var.delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 diff --git a/middleware/php-fpm/README.md b/middleware/php-fpm/README.md index b71e2f0..0782c56 100644 --- a/middleware/php-fpm/README.md +++ b/middleware/php-fpm/README.md @@ -17,7 +17,7 @@ Purpose ------- Creates a DataDog monitors with the following checks : -* PHP FPM process +* PHP FPM connect * PHP FPM load Inputs @@ -26,8 +26,7 @@ Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| | environment | Architecture Environment | string | - | yes | -| evaluation_delay_metric | Delay in seconds for the metric evaluation | string | `600` | no | -| evaluation_delay_service | Delay in seconds for the metric evaluation | string | `15` | no | +| delay | Delay in seconds for the metric evaluation | string | `15` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | message | Message sent when an alert is triggered | string | - | yes | @@ -36,4 +35,4 @@ Inputs | php_fpm_busy_threshold_critical | php fpm busy critical threshold | string | `0.9` | no | | php_fpm_busy_threshold_warning | php fpm busy warning threshold | string | `0.8` | no | | php_fpm_connect_message | Custom message for PHP FPM process monitor | string | `` | no | -| php_fpm_connect_silenced | Groups to mute for PHP FPM process monitor | map | `` | no | \ No newline at end of file +| php_fpm_connect_silenced | Groups to mute for PHP FPM process monitor | map | `` | no | diff --git a/middleware/php-fpm/inputs.tf b/middleware/php-fpm/inputs.tf index 49ac556..858574b 100644 --- a/middleware/php-fpm/inputs.tf +++ b/middleware/php-fpm/inputs.tf @@ -5,16 +5,11 @@ variable "environment" { } # Global DataDog -variable "evaluation_delay_service" { +variable "delay" { description = "Delay in seconds for the metric evaluation" default = 15 } -variable "evaluation_delay_metric" { - description = "Delay in seconds for the metric evaluation" - default = 600 -} - variable "message" { description = "Message sent when an alert is triggered" } diff --git a/middleware/php-fpm/monitors-fpm.tf b/middleware/php-fpm/monitors-fpm.tf index 16a944d..35c7cd2 100644 --- a/middleware/php-fpm/monitors-fpm.tf +++ b/middleware/php-fpm/monitors-fpm.tf @@ -26,8 +26,8 @@ resource "datadog_monitor" "datadog_php_fpm_connect_idle" { } notify_no_data = true - evaluation_delay = "${var.evaluation_delay_metric}" - new_host_delay = "${var.evaluation_delay_metric}" + evaluation_delay = "${var.delay_metric}" + new_host_delay = "${var.delay_metric}" notify_audit = false timeout_h = 0 include_tags = true @@ -57,8 +57,8 @@ resource "datadog_monitor" "datadog_fpm_process" { } notify_no_data = true - evaluation_delay = "${var.evaluation_delay_service}" - new_host_delay = "${var.evaluation_delay_service}" + evaluation_delay = "${var.delay_service}" + new_host_delay = "${var.delay_service}" renotify_interval = 0 notify_audit = false timeout_h = 0 diff --git a/system/generic/README.md b/system/generic/README.md index 831a20a..f5faf90 100644 --- a/system/generic/README.md +++ b/system/generic/README.md @@ -30,7 +30,7 @@ Inputs | cpu_high_threshold_warning | CPU high warning threshold | string | `80` | no | | cpu_high_timeframe | CPU high timeframe | string | `last_5m` | no | | environment | Architecture Environment | string | - | yes | -| evaluation_delay | Delay in seconds for the metric evaluation | string | `600` | no | +| delay | Delay in seconds for the metric evaluation | string | `15` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | free_disk_inodes_message | Custom message for Free disk inodes monitor | string | `` | no | diff --git a/system/generic/inputs.tf b/system/generic/inputs.tf index 96bd0f2..6d3477a 100644 --- a/system/generic/inputs.tf +++ b/system/generic/inputs.tf @@ -5,9 +5,9 @@ variable "environment" { } # Global DataDog -variable "evaluation_delay" { +variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 15 } variable "message" { diff --git a/system/generic/monitors-system.tf b/system/generic/monitors-system.tf index a52ff10..caaef3b 100644 --- a/system/generic/monitors-system.tf +++ b/system/generic/monitors-system.tf @@ -26,8 +26,8 @@ resource "datadog_monitor" "datadog_cpu_too_high" { tags = ["env:${var.environment}", "type:system", "resource:cpu"] notify_no_data = true - evaluation_delay = "${var.evaluation_delay}" - new_host_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" + new_host_delay = "${var.delay}" notify_audit = false timeout_h = 0 include_tags = true @@ -59,8 +59,8 @@ resource "datadog_monitor" "datadog_free_disk_space_too_low" { tags = ["env:${var.environment}", "type:system", "resource:disk"] notify_no_data = true - evaluation_delay = "${var.evaluation_delay}" - new_host_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" + new_host_delay = "${var.delay}" notify_audit = false timeout_h = 0 include_tags = true @@ -92,8 +92,8 @@ resource "datadog_monitor" "datadog_free_disk_space_inodes_too_low" { tags = ["env:${var.environment}", "type:system", "resource:disk"] notify_no_data = true - evaluation_delay = "${var.evaluation_delay}" - new_host_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" + new_host_delay = "${var.delay}" notify_audit = false timeout_h = 0 include_tags = true @@ -125,8 +125,8 @@ resource "datadog_monitor" "datadog_free_memory" { tags = ["env:${var.environment}", "type:system", "resource:memory"] notify_no_data = true - evaluation_delay = "${var.evaluation_delay}" - new_host_delay = "${var.evaluation_delay}" + evaluation_delay = "${var.delay}" + new_host_delay = "${var.delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 From ca9cdff481e798c1cb9e074f3177e1b5ba42a4a1 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Fri, 23 Mar 2018 23:22:29 +0100 Subject: [PATCH 2/7] MON-96 update system readme and add load monitor --- system/generic/README.md | 11 ++++++++++- system/generic/inputs.tf | 27 +++++++++++++++++++++++++ system/generic/monitors-system.tf | 33 +++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) diff --git a/system/generic/README.md b/system/generic/README.md index f5faf90..e56af90 100644 --- a/system/generic/README.md +++ b/system/generic/README.md @@ -17,7 +17,11 @@ Purpose ------- Creates a DataDog monitors with the following checks : -* System CPU High +* CPU usage +* CPU load ratio +* Free memory +* Free disk inodes +* Free disk space Inputs ------ @@ -29,6 +33,11 @@ Inputs | cpu_high_threshold_critical | CPU high critical threshold | string | `95` | no | | cpu_high_threshold_warning | CPU high warning threshold | string | `80` | no | | cpu_high_timeframe | CPU high timeframe | string | `last_5m` | no | +| cpu_load_message | Custom message for CPU load ratio monitor | string | `` | no | +| cpu_load_silenced | Groups to mute for CPU load ratio monitor | map | `` | no | +| cpu_load_threshold_critical | CPU load ratio critical threshold | string | `4` | no | +| cpu_load_threshold_warning | CPU load ratio warning threshold | string | `3` | no | +| cpu_load_timeframe | CPU load timeframe | string | `last_5m` | no | | environment | Architecture Environment | string | - | yes | | delay | Delay in seconds for the metric evaluation | string | `15` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | diff --git a/system/generic/inputs.tf b/system/generic/inputs.tf index 6d3477a..8a77608 100644 --- a/system/generic/inputs.tf +++ b/system/generic/inputs.tf @@ -53,6 +53,33 @@ variable "cpu_high_threshold_critical" { default = 95 } +variable "cpu_load_silenced" { + description = "Groups to mute for CPU load ratio monitor" + type = "map" + default = {} +} + +variable "cpu_load_message" { + description = "Custom message for CPU load ratio monitor" + type = "string" + default = "" +} + +variable "cpu_load_timeframe" { + description = "CPU load ratio timeframe" + default = "last_5m" +} + +variable "cpu_load_threshold_warning" { + description = "CPU load ratio warning threshold" + default = 3 +} + +variable "cpu_load_threshold_critical" { + description = "CPU load ratio critical threshold" + default = 4 +} + variable "free_disk_space_silenced" { description = "Groups to mute for Free diskspace monitor" type = "map" diff --git a/system/generic/monitors-system.tf b/system/generic/monitors-system.tf index caaef3b..9fcf9cc 100644 --- a/system/generic/monitors-system.tf +++ b/system/generic/monitors-system.tf @@ -38,6 +38,39 @@ resource "datadog_monitor" "datadog_cpu_too_high" { silenced = "${var.cpu_high_silenced}" } +resource "datadog_monitor" "datadog_load_too_high" { + name = "[${var.environment}] CPU load 5 {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + message = "${coalesce(var.cpu_load_message, var.message)}" + + query = < ${var.cpu_load_threshold_critical} + EOF + + type = "metric alert" + + thresholds { + warning = "${var.cpu_load_threshold_warning}" + critical = "${var.cpu_load_threshold_critical}" + } + + tags = ["env:${var.environment}", "type:system", "resource:load"] + + notify_no_data = true + evaluation_delay = "${var.delay}" + new_host_delay = "${var.delay}" + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false + require_full_window = true + no_data_timeframe = 20 + + silenced = "${var.cpu_load_silenced}" +} + resource "datadog_monitor" "datadog_free_disk_space_too_low" { name = "[${var.environment}] Free disk space {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.free_disk_space_message, var.message)}" From c5d6e58737296fb170a1e6cc131b162a5822abb8 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Fri, 23 Mar 2018 23:34:39 +0100 Subject: [PATCH 3/7] MON-96 harmonize elb and alb and apigateway requests monitors --- cloud/aws/alb/README.md | 2 +- cloud/aws/alb/monitors-alb.tf | 8 ++++---- cloud/aws/apigateway/monitors-api.tf | 4 ++-- cloud/aws/elb/README.md | 3 ++- cloud/aws/elb/inputs.tf | 6 ++++++ cloud/aws/elb/monitors-elb.tf | 18 +++++++++--------- 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/cloud/aws/alb/README.md b/cloud/aws/alb/README.md index 697643e..25aa0ca 100644 --- a/cloud/aws/alb/README.md +++ b/cloud/aws/alb/README.md @@ -32,7 +32,7 @@ Inputs |------|-------------|:----:|:-----:|:-----:| | alb_no_healthy_instances_message | Custom message for ALB no healthy instances monitor | string | `` | no | | alb_no_healthy_instances_silenced | Groups to mute for ALB no healthy instances monitor | map | `` | no | -| artificial_requests_count | Number of false requests used to mitigate false positive in case of low trafic | string | `0` | no | +| artificial_requests_count | Number of false requests used to mitigate false positive in case of low trafic | string | `5` | no | | delay | Delay in seconds for the metric evaluation | string | `900` | no | | environment | Architecture environment | string | - | yes | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | diff --git a/cloud/aws/alb/monitors-alb.tf b/cloud/aws/alb/monitors-alb.tf index e03c8d2..abff4a5 100644 --- a/cloud/aws/alb/monitors-alb.tf +++ b/cloud/aws/alb/monitors-alb.tf @@ -73,7 +73,7 @@ resource "datadog_monitor" "ALB_httpcode_elb_5xx" { message = "${coalesce(var.httpcode_elb_5xx_message, var.message)}" query = <` | no | | elb_4xx_threshold_critical | loadbalancer 4xx critical threshold in percentage | string | `10` | no | @@ -57,4 +58,4 @@ Inputs | delay | Delay in seconds for the metric evaluation | string | `900` | no | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | -| message | Message sent when an alert is triggered | string | - | yes | \ No newline at end of file +| message | Message sent when an alert is triggered | string | - | yes | diff --git a/cloud/aws/elb/inputs.tf b/cloud/aws/elb/inputs.tf index ef88673..c45c140 100644 --- a/cloud/aws/elb/inputs.tf +++ b/cloud/aws/elb/inputs.tf @@ -150,3 +150,9 @@ variable "elb_backend_latency_critical" { description = "latency critical threshold in seconds" default = 5 } + +variable "artificial_requests_count" { + default = 5 + description = "Number of false requests used to mitigate false positive in case of low trafic" +} + diff --git a/cloud/aws/elb/monitors-elb.tf b/cloud/aws/elb/monitors-elb.tf index 79ab870..90d4750 100644 --- a/cloud/aws/elb/monitors-elb.tf +++ b/cloud/aws/elb/monitors-elb.tf @@ -39,10 +39,10 @@ resource "datadog_monitor" "ELB_too_much_4xx" { message = "${coalesce(var.elb_4xx_message, var.message)}" query = < ${var.elb_4xx_threshold_critical} EOF @@ -75,10 +75,10 @@ resource "datadog_monitor" "ELB_too_much_5xx" { message = "${coalesce(var.elb_5xx_message, var.message)}" query = < ${var.elb_5xx_threshold_critical} EOF @@ -111,10 +111,10 @@ resource "datadog_monitor" "ELB_too_much_4xx_backend" { message = "${coalesce(var.elb_backend_4xx_message, var.message)}" query = < ${var.elb_backend_4xx_threshold_critical} EOF @@ -147,10 +147,10 @@ resource "datadog_monitor" "ELB_too_much_5xx_backend" { message = "${coalesce(var.elb_backend_5xx_message, var.message)}" query = < ${var.elb_backend_5xx_threshold_critical} EOF From 55471dc457e51a429073e4e274ab0a65ac945449 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Fri, 23 Mar 2018 23:44:39 +0100 Subject: [PATCH 4/7] MON-96 terraform fmt on elb --- cloud/aws/elb/inputs.tf | 1 - 1 file changed, 1 deletion(-) diff --git a/cloud/aws/elb/inputs.tf b/cloud/aws/elb/inputs.tf index c45c140..6cd1338 100644 --- a/cloud/aws/elb/inputs.tf +++ b/cloud/aws/elb/inputs.tf @@ -155,4 +155,3 @@ variable "artificial_requests_count" { default = 5 description = "Number of false requests used to mitigate false positive in case of low trafic" } - From 78e4ccc257f90e68fbaef1ea88c4744050bdf716 Mon Sep 17 00:00:00 2001 From: Alexandre Gaillet Date: Tue, 27 Mar 2018 16:29:55 +0200 Subject: [PATCH 5/7] MON-96 - ALB memory monitor unit fixed --- cloud/aws/alb/monitors-alb.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/aws/alb/monitors-alb.tf b/cloud/aws/alb/monitors-alb.tf index abff4a5..6b77e39 100644 --- a/cloud/aws/alb/monitors-alb.tf +++ b/cloud/aws/alb/monitors-alb.tf @@ -38,7 +38,7 @@ resource "datadog_monitor" "ALB_no_healthy_instances" { } resource "datadog_monitor" "ALB_latency" { - name = "[${var.environment}] ALB latency {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + name = "[${var.environment}] ALB latency {{#is_alert}}{{comparator}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}s ({{value}}s){{/is_warning}}" type = "metric alert" message = "${coalesce(var.latency_message, var.message)}" From a2bc4d40f023e9c8d8cece9d5e0bc07000ddcd94 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Thu, 29 Mar 2018 16:34:04 +0200 Subject: [PATCH 6/7] MON-96 replace avg by min on elb, alb and api gateway to avoid false positive --- cloud/aws/alb/monitors-alb.tf | 20 ++++++++++---------- cloud/aws/apigateway/monitors-api.tf | 12 ++++++------ cloud/aws/elb/monitors-elb.tf | 22 +++++++++++----------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/cloud/aws/alb/monitors-alb.tf b/cloud/aws/alb/monitors-alb.tf index 6b77e39..9b39352 100644 --- a/cloud/aws/alb/monitors-alb.tf +++ b/cloud/aws/alb/monitors-alb.tf @@ -15,7 +15,7 @@ resource "datadog_monitor" "ALB_no_healthy_instances" { query = < ${var.latency_threshold_critical} EOF @@ -75,8 +75,8 @@ resource "datadog_monitor" "ALB_httpcode_elb_5xx" { query = < ${var.httpcode_elb_5xx_threshold_critical} EOF @@ -108,8 +108,8 @@ resource "datadog_monitor" "ALB_httpcode_elb_4xx" { query = < ${var.httpcode_elb_4xx_threshold_critical} EOF @@ -141,8 +141,8 @@ resource "datadog_monitor" "ALB_httpcode_target_5xx" { query = < ${var.httpcode_target_5xx_threshold_critical} EOF @@ -174,8 +174,8 @@ resource "datadog_monitor" "ALB_httpcode_target_4xx" { query = < ${var.httpcode_target_4xx_threshold_critical} EOF diff --git a/cloud/aws/apigateway/monitors-api.tf b/cloud/aws/apigateway/monitors-api.tf index 17a515f..2300294 100644 --- a/cloud/aws/apigateway/monitors-api.tf +++ b/cloud/aws/apigateway/monitors-api.tf @@ -5,8 +5,8 @@ resource "datadog_monitor" "API_Gateway_latency" { message = "${coalesce(var.latency_message, var.message)}" query = < ${var.latency_threshold_critical} EOF @@ -38,8 +38,8 @@ resource "datadog_monitor" "API_http_5xx_errors_count" { query = < ${var.http_5xx_requests_threshold_critical} EOF @@ -72,8 +72,8 @@ resource "datadog_monitor" "API_http_4xx_errors_count" { query = < ${var.http_4xx_requests_threshold_critical} EOF diff --git a/cloud/aws/elb/monitors-elb.tf b/cloud/aws/elb/monitors-elb.tf index 90d4750..f4824fa 100644 --- a/cloud/aws/elb/monitors-elb.tf +++ b/cloud/aws/elb/monitors-elb.tf @@ -11,8 +11,8 @@ resource "datadog_monitor" "ELB_no_healthy_instances" { message = "${coalesce(var.elb_no_healthy_instance_message, var.message)}" query = < ${var.elb_4xx_threshold_critical} EOF @@ -77,8 +77,8 @@ resource "datadog_monitor" "ELB_too_much_5xx" { query = < ${var.elb_5xx_threshold_critical} EOF @@ -113,8 +113,8 @@ resource "datadog_monitor" "ELB_too_much_4xx_backend" { query = < ${var.elb_backend_4xx_threshold_critical} EOF @@ -149,8 +149,8 @@ resource "datadog_monitor" "ELB_too_much_5xx_backend" { query = < ${var.elb_backend_5xx_threshold_critical} EOF @@ -184,7 +184,7 @@ resource "datadog_monitor" "ELB_backend_latency" { query = < ${var.elb_backend_latency_critical} EOF From 1f834374ea0033584ab4e78ff70ced400837c930 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Thu, 29 Mar 2018 17:01:44 +0200 Subject: [PATCH 7/7] MON-96 fix comparator html not interpreted --- cloud/aws/alb/monitors-alb.tf | 10 +++---- cloud/aws/apigateway/monitors-api.tf | 6 ++--- .../elasticsearch/monitors-elasticsearch.tf | 4 +-- cloud/aws/elb/monitors-elb.tf | 10 +++---- cloud/aws/rds/monitors-rds.tf | 4 +-- .../monitors-azure-apimanagement.tf | 8 +++--- .../app-services/monitors-app_services.tf | 10 +++---- cloud/azure/eventhub/monitors-eventhub.tf | 4 +-- cloud/azure/iothubs/monitors-iothubs.tf | 26 +++++++++---------- cloud/azure/redis/monitors-azure-redis.tf | 6 ++--- .../monitors-sql-database-basics.tf | 8 +++--- cloud/azure/storage/monitors-azure-storage.tf | 16 ++++++------ .../monitors-stream-analytics.tf | 8 +++--- middleware/php-fpm/monitors-fpm.tf | 2 +- system/generic/monitors-system.tf | 10 +++---- 15 files changed, 66 insertions(+), 66 deletions(-) diff --git a/cloud/aws/alb/monitors-alb.tf b/cloud/aws/alb/monitors-alb.tf index 9b39352..b7079f0 100644 --- a/cloud/aws/alb/monitors-alb.tf +++ b/cloud/aws/alb/monitors-alb.tf @@ -38,7 +38,7 @@ resource "datadog_monitor" "ALB_no_healthy_instances" { } resource "datadog_monitor" "ALB_latency" { - name = "[${var.environment}] ALB latency {{#is_alert}}{{comparator}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}s ({{value}}s){{/is_warning}}" + name = "[${var.environment}] ALB latency {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}" type = "metric alert" message = "${coalesce(var.latency_message, var.message)}" @@ -68,7 +68,7 @@ resource "datadog_monitor" "ALB_latency" { } resource "datadog_monitor" "ALB_httpcode_elb_5xx" { - name = "[${var.environment}] ALB HTTP code 5xx {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + name = "[${var.environment}] ALB HTTP code 5xx {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" type = "metric alert" message = "${coalesce(var.httpcode_elb_5xx_message, var.message)}" @@ -101,7 +101,7 @@ resource "datadog_monitor" "ALB_httpcode_elb_5xx" { } resource "datadog_monitor" "ALB_httpcode_elb_4xx" { - name = "[${var.environment}] ALB HTTP code 4xx {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + name = "[${var.environment}] ALB HTTP code 4xx {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" type = "metric alert" message = "${coalesce(var.httpcode_elb_4xx_message, var.message)}" @@ -134,7 +134,7 @@ resource "datadog_monitor" "ALB_httpcode_elb_4xx" { } resource "datadog_monitor" "ALB_httpcode_target_5xx" { - name = "[${var.environment}] ALB target HTTP code 5xx {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + name = "[${var.environment}] ALB target HTTP code 5xx {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" type = "metric alert" message = "${coalesce(var.httpcode_target_5xx_message, var.message)}" @@ -167,7 +167,7 @@ resource "datadog_monitor" "ALB_httpcode_target_5xx" { } resource "datadog_monitor" "ALB_httpcode_target_4xx" { - name = "[${var.environment}] ALB target HTTP code 4xx {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + name = "[${var.environment}] ALB target HTTP code 4xx {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" type = "metric alert" message = "${coalesce(var.httpcode_target_4xx_message, var.message)}" diff --git a/cloud/aws/apigateway/monitors-api.tf b/cloud/aws/apigateway/monitors-api.tf index 2300294..c6d5ca2 100644 --- a/cloud/aws/apigateway/monitors-api.tf +++ b/cloud/aws/apigateway/monitors-api.tf @@ -1,6 +1,6 @@ # Monitoring Api Gateway latency resource "datadog_monitor" "API_Gateway_latency" { - name = "[${var.environment}] API Gateway latency {{#is_alert}}{{comparator}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}" + name = "[${var.environment}] API Gateway latency {{#is_alert}}{{{comparator}}} {{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}ms ({{value}}ms){{/is_warning}}" type = "metric alert" message = "${coalesce(var.latency_message, var.message)}" @@ -31,7 +31,7 @@ resource "datadog_monitor" "API_Gateway_latency" { # Monitoring API Gateway 5xx errors percent resource "datadog_monitor" "API_http_5xx_errors_count" { - name = "[${var.environment}] API Gateway HTTP 5xx errors {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + name = "[${var.environment}] API Gateway HTTP 5xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" type = "metric alert" message = "${coalesce(var.http_5xx_requests_message, var.message)}" @@ -65,7 +65,7 @@ resource "datadog_monitor" "API_http_5xx_errors_count" { # Monitoring API Gateway 4xx errors percent resource "datadog_monitor" "API_http_4xx_errors_count" { - name = "[${var.environment}] API Gateway HTTP 4xx errors {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + name = "[${var.environment}] API Gateway HTTP 4xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" type = "metric alert" message = "${coalesce(var.http_4xx_requests_message, var.message)}" diff --git a/cloud/aws/elasticsearch/monitors-elasticsearch.tf b/cloud/aws/elasticsearch/monitors-elasticsearch.tf index 1e3f0ab..fac7659 100644 --- a/cloud/aws/elasticsearch/monitors-elasticsearch.tf +++ b/cloud/aws/elasticsearch/monitors-elasticsearch.tf @@ -47,7 +47,7 @@ EOF ### Elasticsearch cluster free storage space monitor ### resource "datadog_monitor" "es_free_space_low" { - name = "[${var.environment}] ElasticSearch cluster free storage space {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + name = "[${var.environment}] ElasticSearch cluster free storage space {{#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" @@ -82,7 +82,7 @@ EOF ### Elasticsearch cluster CPU monitor ### resource "datadog_monitor" "es_cpu_90_15min" { - name = "[${var.environment}] ElasticSearch cluster CPU high {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + name = "[${var.environment}] ElasticSearch cluster CPU high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.cpu_message, var.message)}" type = "metric alert" diff --git a/cloud/aws/elb/monitors-elb.tf b/cloud/aws/elb/monitors-elb.tf index f4824fa..47139ad 100644 --- a/cloud/aws/elb/monitors-elb.tf +++ b/cloud/aws/elb/monitors-elb.tf @@ -35,7 +35,7 @@ resource "datadog_monitor" "ELB_no_healthy_instances" { } resource "datadog_monitor" "ELB_too_much_4xx" { - name = "[${var.environment}] ELB 4xx errors too high {{#is_alert}}{{comparator}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + name = "[${var.environment}] ELB 4xx errors too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.elb_4xx_message, var.message)}" query = <