diff --git a/cloud/azure/app-services/inputs.tf b/cloud/azure/app-services/inputs.tf index 666a394..dc26017 100644 --- a/cloud/azure/app-services/inputs.tf +++ b/cloud/azure/app-services/inputs.tf @@ -16,37 +16,37 @@ variable "response_time_appserv_eval_delay" { } variable "response_time_threshold_critical" { - default = 0.8 + default = 0.8 description = "Alerting threshold in seconds" } variable "response_time_threshold_warning" { - default = 0.4 + default = 0.4 description = "Warning threshold in seconds" } variable "response_time_last_time_window_code" { - default = "1h" + default = "1h" description = "Query time window code, can be: 1h|4h|1d|2d|1w|1m|3m... to write last_#m (1, 5, 10, 15, or 30), last_#h (1, 2, or 4), or last_#d (1 or 2)" } variable "response_time_require_full_window" { - default = false + default = false description = "A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to False for sparse metrics, otherwise some evaluations will be skipped. Default: True for 'on average', 'at all times' and 'in total' aggregation. False otherwise." } variable "response_time_tags" { - default = [] + default = [] description = "A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API" } variable "response_time_timeout_h" { - default = false + default = false description = "The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false." } variable "response_time_include_tags" { - default = false + default = false description = "A boolean indicating whether notifications from this monitor will automatically insert its triggering tags into the title. Defaults to true." } @@ -56,12 +56,12 @@ variable "response_time_include_tags" { # } variable "response_time_renotify_interval" { - default = 0 + default = 0 description = "The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved." } variable "response_time_escalation_message" { - default = "Escalation message @pagerduty" + default = "Escalation message @pagerduty" description = "A message to include with a re-notification. Supports the '@username' notification allowed elsewhere." } @@ -73,37 +73,37 @@ variable "memory_usage_appserv_eval_delay" { } variable "memory_usage_threshold_critical" { - default = 52430000 + default = 52430000 description = "Alerting threshold in Mib" } variable "memory_usage_threshold_warning" { - default = 33550000 + default = 33550000 description = "Warning threshold in MiB" } variable "memory_usage_last_time_window_code" { - default = "5m" + default = "5m" description = "Query time window code, can be: 1h|4h|1d|2d|1w|1m|3m... to write last_#m (1, 5, 10, 15, or 30), last_#h (1, 2, or 4), or last_#d (1 or 2)" } variable "memory_usage_require_full_window" { - default = false + default = false description = "A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to False for sparse metrics, otherwise some evaluations will be skipped. Default: True for 'on average', 'at all times' and 'in total' aggregation. False otherwise." } variable "memory_usage_tags" { - default = [] + default = [] description = "A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API" } variable "memory_usage_timeout_h" { - default = false + default = false description = "The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false." } variable "memory_usage_include_tags" { - default = false + default = false description = "A boolean indicating whether notifications from this monitor will automatically insert its triggering tags into the title. Defaults to true." } @@ -113,12 +113,12 @@ variable "memory_usage_include_tags" { # } variable "memory_usage_renotify_interval" { - default = 0 + default = 0 description = "The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved." } variable "memory_usage_escalation_message" { - default = "Escalation message @pagerduty" + default = "Escalation message @pagerduty" description = "A message to include with a re-notification. Supports the '@username' notification allowed elsewhere." } @@ -134,37 +134,37 @@ variable "http_404_errors_count_rate_appserv_eval_delay" { } variable "http_404_errors_count_rate_threshold_critical" { - default = 30 + default = 30 description = "Alerting threshold (number of requests)" } variable "http_404_errors_count_rate_threshold_warning" { - default = 10 + default = 10 description = "Warning threshold (number of requests)" } variable "http_404_errors_count_rate_last_time_window_code" { - default = "5m" + default = "5m" description = "Query time window code, can be: 1h|4h|1d|2d|1w|1m|3m... to write last_#m (1, 5, 10, 15, or 30), last_#h (1, 2, or 4), or last_#d (1 or 2)" } variable "http_404_errors_count_rate_require_full_window" { - default = true + default = true description = "A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to False for sparse metrics, otherwise some evaluations will be skipped. Default: True for 'on average', 'at all times' and 'in total' aggregation. False otherwise." } variable "http_404_errors_count_rate_tags" { - default = [] + default = [] description = "A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API" } variable "http_404_errors_count_rate_timeout_h" { - default = false + default = false description = "The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false." } variable "http_404_errors_count_rate_include_tags" { - default = false + default = false description = "A boolean indicating whether notifications from this monitor will automatically insert its triggering tags into the title. Defaults to true." } @@ -174,12 +174,12 @@ variable "http_404_errors_count_rate_include_tags" { # } variable "http_404_errors_count_rate_renotify_interval" { - default = 0 + default = 0 description = "The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved." } variable "http_404_errors_count_rate_escalation_message" { - default = "Escalation message @pagerduty" + default = "Escalation message @pagerduty" description = "A message to include with a re-notification. Supports the '@username' notification allowed elsewhere." } @@ -195,37 +195,37 @@ variable "http_2xx_status_rate_appserv_eval_delay" { } variable "http_2xx_status_rate_threshold_critical" { - default = 0.9 + default = 0.9 description = "Alerting threshold (percentage)" } variable "http_2xx_status_rate_threshold_warning" { - default = 0.95 + default = 0.95 description = "Warning threshold (percentage)" } variable "http_2xx_status_rate_last_time_window_code" { - default = "5m" + default = "5m" description = "Query time window code, can be: 1h|4h|1d|2d|1w|1m|3m... to write last_#m (1, 5, 10, 15, or 30), last_#h (1, 2, or 4), or last_#d (1 or 2)" } variable "http_2xx_status_rate_require_full_window" { - default = true + default = true description = "A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to False for sparse metrics, otherwise some evaluations will be skipped. Default: True for 'on average', 'at all times' and 'in total' aggregation. False otherwise." } variable "http_2xx_status_rate_tags" { - default = [] + default = [] description = "A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API" } variable "http_2xx_status_rate_timeout_h" { - default = false + default = false description = "The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false." } variable "http_2xx_status_rate_include_tags" { - default = false + default = false description = "A boolean indicating whether notifications from this monitor will automatically insert its triggering tags into the title. Defaults to true." } @@ -235,11 +235,11 @@ variable "http_2xx_status_rate_include_tags" { # } variable "http_2xx_status_rate_renotify_interval" { - default = 0 + default = 0 description = "The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved." } variable "http_2xx_status_rate_escalation_message" { - default = "Escalation message @pagerduty" + default = "Escalation message @pagerduty" description = "A message to include with a re-notification. Supports the '@username' notification allowed elsewhere." } diff --git a/cloud/azure/app-services/monitors-app_services.tf b/cloud/azure/app-services/monitors-app_services.tf index 892b2c4..3e5f94a 100644 --- a/cloud/azure/app-services/monitors-app_services.tf +++ b/cloud/azure/app-services/monitors-app_services.tf @@ -14,8 +14,8 @@ resource "datadog_monitor" "appservices_response_time" { critical = "${var.response_time_threshold_critical}" } - notify_no_data = true # Will notify when no data is received - renotify_interval = "${var.response_time_renotify_interval}" + notify_no_data = true # Will notify when no data is received + renotify_interval = "${var.response_time_renotify_interval}" require_full_window = "${var.response_time_require_full_window}" timeout_h = "${var.response_time_timeout_h}" @@ -40,8 +40,8 @@ resource "datadog_monitor" "appservices_memory_usage_count" { critical = "${var.memory_usage_threshold_critical}" } - notify_no_data = true # Will notify when no data is received - renotify_interval = "${var.memory_usage_renotify_interval}" + notify_no_data = true # Will notify when no data is received + renotify_interval = "${var.memory_usage_renotify_interval}" require_full_window = "${var.memory_usage_require_full_window}" timeout_h = "${var.memory_usage_timeout_h}" @@ -66,8 +66,8 @@ resource "datadog_monitor" "appservices_http_404_errors_count" { critical = "${var.http_404_errors_count_rate_threshold_critical}" } - notify_no_data = false # Will NOT notify when no data is received - renotify_interval = "${var.http_404_errors_count_rate_renotify_interval}" + notify_no_data = false # Will NOT notify when no data is received + renotify_interval = "${var.http_404_errors_count_rate_renotify_interval}" require_full_window = true timeout_h = "${var.http_404_errors_count_rate_timeout_h}" @@ -83,7 +83,7 @@ resource "datadog_monitor" "appservices_http_2xx_status_rate" { message = "{{#is_alert}}${var.critical_escalation_group}{{/is_alert}}{{#is_recovery}}${var.critical_escalation_group}{{/is_recovery}}" escalation_message = "${var.http_2xx_status_rate_escalation_message}" - query = "avg(last_${var.http_2xx_status_rate_last_time_window_code}):avg:azure.app_services.http2xx{*}.as_count() / avg:azure.app_services.http2xx{*}.as_count() < ${var.http_2xx_status_rate_threshold_critical}" + query = "avg(last_${var.http_2xx_status_rate_last_time_window_code}):avg:azure.app_services.http2xx{*}.as_count() / avg:azure.app_services.http2xx{*}.as_count() < ${var.http_2xx_status_rate_threshold_critical}" evaluation_delay = "${var.http_2xx_status_rate_appserv_eval_delay}" thresholds { @@ -91,8 +91,8 @@ resource "datadog_monitor" "appservices_http_2xx_status_rate" { critical = "${var.http_2xx_status_rate_threshold_critical}" } - notify_no_data = true # Will notify when no data is received - renotify_interval = "${var.http_2xx_status_rate_renotify_interval}" + notify_no_data = true # Will notify when no data is received + renotify_interval = "${var.http_2xx_status_rate_renotify_interval}" require_full_window = true timeout_h = "${var.http_2xx_status_rate_timeout_h}"