MON-74: fmt

This commit is contained in:
Jérôme Respaut 2017-10-31 11:18:52 +01:00 committed by Laurent Piroelle
parent 81df985f32
commit 58bbe0bc7b
2 changed files with 45 additions and 45 deletions

View File

@ -16,37 +16,37 @@ variable "response_time_appserv_eval_delay" {
} }
variable "response_time_threshold_critical" { variable "response_time_threshold_critical" {
default = 0.8 default = 0.8
description = "Alerting threshold in seconds" description = "Alerting threshold in seconds"
} }
variable "response_time_threshold_warning" { variable "response_time_threshold_warning" {
default = 0.4 default = 0.4
description = "Warning threshold in seconds" description = "Warning threshold in seconds"
} }
variable "response_time_last_time_window_code" { 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)" 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" { 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." 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" { 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" 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" { 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." 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" { 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." 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" { 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." 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" { 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." 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" { variable "memory_usage_threshold_critical" {
default = 52430000 default = 52430000
description = "Alerting threshold in Mib" description = "Alerting threshold in Mib"
} }
variable "memory_usage_threshold_warning" { variable "memory_usage_threshold_warning" {
default = 33550000 default = 33550000
description = "Warning threshold in MiB" description = "Warning threshold in MiB"
} }
variable "memory_usage_last_time_window_code" { 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)" 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" { 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." 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" { 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" 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" { 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." 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" { 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." 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" { 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." 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" { 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." 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" { variable "http_404_errors_count_rate_threshold_critical" {
default = 30 default = 30
description = "Alerting threshold (number of requests)" description = "Alerting threshold (number of requests)"
} }
variable "http_404_errors_count_rate_threshold_warning" { variable "http_404_errors_count_rate_threshold_warning" {
default = 10 default = 10
description = "Warning threshold (number of requests)" description = "Warning threshold (number of requests)"
} }
variable "http_404_errors_count_rate_last_time_window_code" { 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)" 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" { 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." 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" { 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" 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" { 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." 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" { 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." 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" { 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." 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" { 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." 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" { variable "http_2xx_status_rate_threshold_critical" {
default = 0.9 default = 0.9
description = "Alerting threshold (percentage)" description = "Alerting threshold (percentage)"
} }
variable "http_2xx_status_rate_threshold_warning" { variable "http_2xx_status_rate_threshold_warning" {
default = 0.95 default = 0.95
description = "Warning threshold (percentage)" description = "Warning threshold (percentage)"
} }
variable "http_2xx_status_rate_last_time_window_code" { 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)" 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" { 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." 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" { 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" 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" { 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." 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" { 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." 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" { 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." 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" { 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." description = "A message to include with a re-notification. Supports the '@username' notification allowed elsewhere."
} }

View File

@ -14,8 +14,8 @@ resource "datadog_monitor" "appservices_response_time" {
critical = "${var.response_time_threshold_critical}" critical = "${var.response_time_threshold_critical}"
} }
notify_no_data = true # Will notify when no data is received notify_no_data = true # Will notify when no data is received
renotify_interval = "${var.response_time_renotify_interval}" renotify_interval = "${var.response_time_renotify_interval}"
require_full_window = "${var.response_time_require_full_window}" require_full_window = "${var.response_time_require_full_window}"
timeout_h = "${var.response_time_timeout_h}" timeout_h = "${var.response_time_timeout_h}"
@ -40,8 +40,8 @@ resource "datadog_monitor" "appservices_memory_usage_count" {
critical = "${var.memory_usage_threshold_critical}" critical = "${var.memory_usage_threshold_critical}"
} }
notify_no_data = true # Will notify when no data is received notify_no_data = true # Will notify when no data is received
renotify_interval = "${var.memory_usage_renotify_interval}" renotify_interval = "${var.memory_usage_renotify_interval}"
require_full_window = "${var.memory_usage_require_full_window}" require_full_window = "${var.memory_usage_require_full_window}"
timeout_h = "${var.memory_usage_timeout_h}" 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}" critical = "${var.http_404_errors_count_rate_threshold_critical}"
} }
notify_no_data = false # Will NOT notify when no data is received notify_no_data = false # Will NOT notify when no data is received
renotify_interval = "${var.http_404_errors_count_rate_renotify_interval}" renotify_interval = "${var.http_404_errors_count_rate_renotify_interval}"
require_full_window = true require_full_window = true
timeout_h = "${var.http_404_errors_count_rate_timeout_h}" 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}}" 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}" 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}" evaluation_delay = "${var.http_2xx_status_rate_appserv_eval_delay}"
thresholds { thresholds {
@ -91,8 +91,8 @@ resource "datadog_monitor" "appservices_http_2xx_status_rate" {
critical = "${var.http_2xx_status_rate_threshold_critical}" critical = "${var.http_2xx_status_rate_threshold_critical}"
} }
notify_no_data = true # Will notify when no data is received notify_no_data = true # Will notify when no data is received
renotify_interval = "${var.http_2xx_status_rate_renotify_interval}" renotify_interval = "${var.http_2xx_status_rate_renotify_interval}"
require_full_window = true require_full_window = true
timeout_h = "${var.http_2xx_status_rate_timeout_h}" timeout_h = "${var.http_2xx_status_rate_timeout_h}"