MON-366 Update Azure Application Gateway monitors with suggestions

This commit is contained in:
Laurent Piroelle 2019-11-05 10:33:27 +01:00
parent 8c5be4ad27
commit 0097fd15ac
3 changed files with 57 additions and 57 deletions

View File

@ -16,15 +16,15 @@ module "datadog-monitors-cloud-azure-app-gateway" {
Creates DataDog monitors with the following checks: Creates DataDog monitors with the following checks:
- App Gateway backend connect time - App Gateway backend connect time is too high
- App Gateway Backend HTTP 4xx errors - App Gateway backend has no healthy host
- App Gateway backend HTTP 4xx errors rate is too high
- App Gateway backend HTTP 5xx errors rate is too high
- App Gateway failed requests - App Gateway failed requests
- App Gateway HTTP 4xx errors - App Gateway has no connection
- App Gateway HTTP 5xx errors - App Gateway HTTP 4xx errors rate is too high
- App Gateway HTTP Backend 5xx errors - App Gateway HTTP 5xx errors rate is too high
- App Gateway is down - App Gateway is down
- App Gateway no connection
- App Gateway no healthy host
## Inputs ## Inputs
@ -33,54 +33,54 @@ Creates DataDog monitors with the following checks:
| appgateway\_backend\_connect\_time\_enabled | Flag to enable App Gateway backend_connect_time monitor | string | `"true"` | no | | appgateway\_backend\_connect\_time\_enabled | Flag to enable App Gateway backend_connect_time monitor | string | `"true"` | no |
| appgateway\_backend\_connect\_time\_extra\_tags | Extra tags for App Gateway backend_connect_time monitor | list(string) | `[]` | no | | appgateway\_backend\_connect\_time\_extra\_tags | Extra tags for App Gateway backend_connect_time monitor | list(string) | `[]` | no |
| appgateway\_backend\_connect\_time\_message | Custom message for App Gateway backend_connect_time monitor | string | `""` | no | | appgateway\_backend\_connect\_time\_message | Custom message for App Gateway backend_connect_time monitor | string | `""` | no |
| appgateway\_backend\_connect\_time\_threshold\_critical | Maximum critical backend_connect_time errors | string | `"50"` | no | | appgateway\_backend\_connect\_time\_threshold\_critical | Maximum critical backend_connect_time errors in seconds | string | `"50"` | no |
| appgateway\_backend\_connect\_time\_threshold\_warning | Warning regarding backend_connect_time errors | string | `"40"` | no | | appgateway\_backend\_connect\_time\_threshold\_warning | Warning regarding backend_connect_time errors in seconds | string | `"40"` | no |
| appgateway\_backend\_connect\_time\_time\_aggregator | Monitor aggregator for App Gateway backend_connect_time [available values: min, max or avg] | string | `"min"` | no | | appgateway\_backend\_connect\_time\_time\_aggregator | Monitor aggregator for App Gateway backend_connect_time [available values: min, max or avg] | string | `"max"` | no |
| appgateway\_backend\_connect\_time\_timeframe | Monitor timeframe for App Gateway backend_connect_time [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | appgateway\_backend\_connect\_time\_timeframe | Monitor timeframe for App Gateway backend_connect_time [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
| appgateway\_backend\_http\_4xx\_errors\_enabled | Flag to enable App Gateway http 4xx errors monitor | string | `"true"` | no | | appgateway\_backend\_http\_4xx\_errors\_enabled | Flag to enable App Gateway http 4xx errors monitor | string | `"true"` | no |
| appgateway\_backend\_http\_4xx\_errors\_extra\_tags | Extra tags for App Gateway http 4xx errors monitor | list(string) | `[]` | no | | appgateway\_backend\_http\_4xx\_errors\_extra\_tags | Extra tags for App Gateway http 4xx errors monitor | list(string) | `[]` | no |
| appgateway\_backend\_http\_4xx\_errors\_message | Custom message for App Gateway http 4xx errors monitor | string | `""` | no | | appgateway\_backend\_http\_4xx\_errors\_message | Custom message for App Gateway http 4xx errors monitor | string | `""` | no |
| appgateway\_backend\_http\_4xx\_errors\_threshold\_critical | Minimum critical acceptable percent of 4xx error | string | `"30"` | no | | appgateway\_backend\_http\_4xx\_errors\_threshold\_critical | Minimum critical acceptable percent of 4xx error | string | `"95"` | no |
| appgateway\_backend\_http\_4xx\_errors\_threshold\_warning | Warning regarding acceptable percent of 4xx error | string | `"20"` | no | | appgateway\_backend\_http\_4xx\_errors\_threshold\_warning | Warning regarding acceptable percent of 4xx error | string | `"80"` | no |
| appgateway\_backend\_http\_4xx\_errors\_time\_aggregator | Monitor aggregator for App Gateway http 4xx errors [available values: min, max or avg] | string | `"max"` | no | | appgateway\_backend\_http\_4xx\_errors\_time\_aggregator | Monitor aggregator for App Gateway http 4xx errors [available values: min, max or avg] | string | `"max"` | no |
| appgateway\_backend\_http\_4xx\_errors\_timeframe | Monitor timeframe for App Gateway http 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | appgateway\_backend\_http\_4xx\_errors\_timeframe | Monitor timeframe for App Gateway http 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
| appgateway\_backend\_http\_5xx\_errors\_enabled | Flag to enable App Gateway http 5xx errors monitor | string | `"true"` | no | | appgateway\_backend\_http\_5xx\_errors\_enabled | Flag to enable App Gateway http 5xx errors monitor | string | `"true"` | no |
| appgateway\_backend\_http\_5xx\_errors\_extra\_tags | Extra tags for App Gateway http 5xx errors monitor | list(string) | `[]` | no | | appgateway\_backend\_http\_5xx\_errors\_extra\_tags | Extra tags for App Gateway http 5xx errors monitor | list(string) | `[]` | no |
| appgateway\_backend\_http\_5xx\_errors\_message | Custom message for App Gateway http 5xx errors monitor | string | `""` | no | | appgateway\_backend\_http\_5xx\_errors\_message | Custom message for App Gateway http 5xx errors monitor | string | `""` | no |
| appgateway\_backend\_http\_5xx\_errors\_threshold\_critical | Minimum critical acceptable percent of 5xx error | string | `"30"` | no | | appgateway\_backend\_http\_5xx\_errors\_threshold\_critical | Minimum critical acceptable percent of 5xx error | string | `"95"` | no |
| appgateway\_backend\_http\_5xx\_errors\_threshold\_warning | Warning regarding acceptable percent of 5xx error | string | `"20"` | no | | appgateway\_backend\_http\_5xx\_errors\_threshold\_warning | Warning regarding acceptable percent of 5xx error | string | `"80"` | no |
| appgateway\_backend\_http\_5xx\_errors\_time\_aggregator | Monitor aggregator for App Gateway http 5xx errors [available values: min, max or avg] | string | `"max"` | no | | appgateway\_backend\_http\_5xx\_errors\_time\_aggregator | Monitor aggregator for App Gateway http 5xx errors [available values: min, max or avg] | string | `"max"` | no |
| appgateway\_backend\_http\_5xx\_errors\_timeframe | Monitor timeframe for App Gateway http 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | appgateway\_backend\_http\_5xx\_errors\_timeframe | Monitor timeframe for App Gateway http 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
| appgateway\_failed\_requests\_enabled | Flag to enable App Gateway failed requests monitor | string | `"true"` | no | | appgateway\_failed\_requests\_enabled | Flag to enable App Gateway failed requests monitor | string | `"true"` | no |
| appgateway\_failed\_requests\_extra\_tags | Extra tags for App Gateway failed requests monitor | list(string) | `[]` | no | | appgateway\_failed\_requests\_extra\_tags | Extra tags for App Gateway failed requests monitor | list(string) | `[]` | no |
| appgateway\_failed\_requests\_message | Custom message for App Gateway failed requests monitor | string | `""` | no | | appgateway\_failed\_requests\_message | Custom message for App Gateway failed requests monitor | string | `""` | no |
| appgateway\_failed\_requests\_threshold\_critical | Maximum critical acceptable percent of failed errors | string | `"50"` | no | | appgateway\_failed\_requests\_threshold\_critical | Maximum critical acceptable percent of failed errors | string | `"95"` | no |
| appgateway\_failed\_requests\_threshold\_warning | Warning regarding acceptable percent of failed errors | string | `"40"` | no | | appgateway\_failed\_requests\_threshold\_warning | Warning regarding acceptable percent of failed errors | string | `"80"` | no |
| appgateway\_failed\_requests\_time\_aggregator | Monitor aggregator for App Gateway failed requests [available values: min, max or avg] | string | `"min"` | no | | appgateway\_failed\_requests\_time\_aggregator | Monitor aggregator for App Gateway failed requests [available values: min, max or avg] | string | `"min"` | no |
| appgateway\_failed\_requests\_timeframe | Monitor timeframe for App Gateway failed requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | appgateway\_failed\_requests\_timeframe | Monitor timeframe for App Gateway failed requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
| appgateway\_healthy\_host\_count\_enabled | Flag to enable App Gateway healthy host monitor | string | `"true"` | no | | appgateway\_healthy\_host\_count\_enabled | Flag to enable App Gateway healthy host monitor | string | `"true"` | no |
| appgateway\_healthy\_host\_count\_extra\_tags | Extra tags for App Gateway healthy host monitor | list(string) | `[]` | no | | appgateway\_healthy\_host\_count\_extra\_tags | Extra tags for App Gateway healthy host monitor | list(string) | `[]` | no |
| appgateway\_healthy\_host\_count\_message | Custom message for App Gateway healthy host monitor | string | `""` | no | | appgateway\_healthy\_host\_count\_message | Custom message for App Gateway healthy host monitor | string | `""` | no |
| appgateway\_healthy\_host\_count\_time\_aggregator | Monitor aggregator for App Gateway healthy host [available values: min, max or avg] | string | `"min"` | no | | appgateway\_healthy\_host\_count\_time\_aggregator | Monitor aggregator for App Gateway healthy host [available values: min, max or avg] | string | `"max"` | no |
| appgateway\_healthy\_host\_count\_timeframe | Monitor timeframe for App Gateway healthy host [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | appgateway\_healthy\_host\_count\_timeframe | Monitor timeframe for App Gateway healthy host [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
| appgateway\_http\_4xx\_errors\_enabled | Flag to enable App Gateway http 4xx errors monitor | string | `"true"` | no | | appgateway\_http\_4xx\_errors\_enabled | Flag to enable App Gateway http 4xx errors monitor | string | `"true"` | no |
| appgateway\_http\_4xx\_errors\_extra\_tags | Extra tags for App Gateway http 4xx errors monitor | list(string) | `[]` | no | | appgateway\_http\_4xx\_errors\_extra\_tags | Extra tags for App Gateway http 4xx errors monitor | list(string) | `[]` | no |
| appgateway\_http\_4xx\_errors\_message | Custom message for App Gateway http 4xx errors monitor | string | `""` | no | | appgateway\_http\_4xx\_errors\_message | Custom message for App Gateway http 4xx errors monitor | string | `""` | no |
| appgateway\_http\_4xx\_errors\_threshold\_critical | Minimum critical acceptable percent of 4xx error | string | `"30"` | no | | appgateway\_http\_4xx\_errors\_threshold\_critical | Maximum critical acceptable percent of 4xx error | string | `"95"` | no |
| appgateway\_http\_4xx\_errors\_threshold\_warning | Warning regarding acceptable percent of 4xx error | string | `"20"` | no | | appgateway\_http\_4xx\_errors\_threshold\_warning | Warning regarding acceptable percent of 4xx error | string | `"80"` | no |
| appgateway\_http\_4xx\_errors\_time\_aggregator | Monitor aggregator for App Gateway http 4xx errors [available values: min, max or avg] | string | `"max"` | no | | appgateway\_http\_4xx\_errors\_time\_aggregator | Monitor aggregator for App Gateway http 4xx errors [available values: min, max or avg] | string | `"max"` | no |
| appgateway\_http\_4xx\_errors\_timeframe | Monitor timeframe for App Gateway http 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | appgateway\_http\_4xx\_errors\_timeframe | Monitor timeframe for App Gateway http 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
| appgateway\_http\_5xx\_errors\_enabled | Flag to enable App Gateway http 5xx errors monitor | string | `"true"` | no | | appgateway\_http\_5xx\_errors\_enabled | Flag to enable App Gateway http 5xx errors monitor | string | `"true"` | no |
| appgateway\_http\_5xx\_errors\_extra\_tags | Extra tags for App Gateway http 5xx errors monitor | list(string) | `[]` | no | | appgateway\_http\_5xx\_errors\_extra\_tags | Extra tags for App Gateway http 5xx errors monitor | list(string) | `[]` | no |
| appgateway\_http\_5xx\_errors\_message | Custom message for App Gateway http 5xx errors monitor | string | `""` | no | | appgateway\_http\_5xx\_errors\_message | Custom message for App Gateway http 5xx errors monitor | string | `""` | no |
| appgateway\_http\_5xx\_errors\_threshold\_critical | Minimum critical acceptable percent of 5xx error | string | `"30"` | no | | appgateway\_http\_5xx\_errors\_threshold\_critical | Maximum critical acceptable percent of 5xx error | string | `"95"` | no |
| appgateway\_http\_5xx\_errors\_threshold\_warning | Warning regarding acceptable percent of 5xx error | string | `"20"` | no | | appgateway\_http\_5xx\_errors\_threshold\_warning | Warning regarding acceptable percent of 5xx error | string | `"80"` | no |
| appgateway\_http\_5xx\_errors\_time\_aggregator | Monitor aggregator for App Gateway http 5xx errors [available values: min, max or avg] | string | `"max"` | no | | appgateway\_http\_5xx\_errors\_time\_aggregator | Monitor aggregator for App Gateway http 5xx errors [available values: min, max or avg] | string | `"max"` | no |
| appgateway\_http\_5xx\_errors\_timeframe | Monitor timeframe for App Gateway http 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | appgateway\_http\_5xx\_errors\_timeframe | Monitor timeframe for App Gateway http 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
| current\_connection\_enabled | Flag to enable App Gateway current connections monitor | string | `"true"` | no | | current\_connection\_enabled | Flag to enable App Gateway current connections monitor | string | `"true"` | no |
| current\_connection\_extra\_tags | Extra tags for App Gateway current connections monitor | list(string) | `[]` | no | | current\_connection\_extra\_tags | Extra tags for App Gateway current connections monitor | list(string) | `[]` | no |
| current\_connection\_message | Custom message for App Gateway current connections monitor | string | `""` | no | | current\_connection\_message | Custom message for App Gateway current connections monitor | string | `""` | no |
| current\_connection\_time\_aggregator | Monitor aggregator for App Gateway current connections [available values: min, max or avg] | string | `"min"` | no | | current\_connection\_time\_aggregator | Monitor aggregator for App Gateway current connections [available values: min, max or avg] | string | `"max"` | no |
| current\_connection\_timeframe | Monitor timeframe for App Gateway current connections [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | current\_connection\_timeframe | Monitor timeframe for App Gateway current connections [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
| environment | Architecture environment | string | n/a | yes | | environment | Architecture environment | string | n/a | yes |
| evaluation\_delay | Delay in seconds for the metric evaluation | string | `"900"` | no | | evaluation\_delay | Delay in seconds for the metric evaluation | string | `"900"` | no |
@ -93,7 +93,7 @@ Creates DataDog monitors with the following checks:
| status\_enabled | Flag to enable App Gateway status | string | `"true"` | no | | status\_enabled | Flag to enable App Gateway status | string | `"true"` | no |
| status\_extra\_tags | Extra tags for App Gateway status | list(string) | `[]` | no | | status\_extra\_tags | Extra tags for App Gateway status | list(string) | `[]` | no |
| status\_message | Custom message for App Gateway status | string | `""` | no | | status\_message | Custom message for App Gateway status | string | `""` | no |
| status\_time\_aggregator | Monitor aggregator for App Gateway status [available values: min, max or avg] | string | `"min"` | no | | status\_time\_aggregator | Monitor aggregator for App Gateway status [available values: min, max or avg] | string | `"max"` | no |
| status\_timeframe | Monitor timeframe for App Gateway status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | status\_timeframe | Monitor timeframe for App Gateway status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
## Outputs ## Outputs

View File

@ -61,7 +61,7 @@ variable "status_message" {
variable "status_time_aggregator" { variable "status_time_aggregator" {
description = "Monitor aggregator for App Gateway status [available values: min, max or avg]" description = "Monitor aggregator for App Gateway status [available values: min, max or avg]"
type = string type = string
default = "min" default = "max"
} }
variable "status_timeframe" { variable "status_timeframe" {
@ -92,7 +92,7 @@ variable "current_connection_message" {
variable "current_connection_time_aggregator" { variable "current_connection_time_aggregator" {
description = "Monitor aggregator for App Gateway current connections [available values: min, max or avg]" description = "Monitor aggregator for App Gateway current connections [available values: min, max or avg]"
type = string type = string
default = "min" default = "max"
} }
variable "current_connection_timeframe" { variable "current_connection_timeframe" {
@ -123,7 +123,7 @@ variable "appgateway_backend_connect_time_message" {
variable "appgateway_backend_connect_time_time_aggregator" { variable "appgateway_backend_connect_time_time_aggregator" {
description = "Monitor aggregator for App Gateway backend_connect_time [available values: min, max or avg]" description = "Monitor aggregator for App Gateway backend_connect_time [available values: min, max or avg]"
type = string type = string
default = "min" default = "max"
} }
variable "appgateway_backend_connect_time_timeframe" { variable "appgateway_backend_connect_time_timeframe" {
@ -134,12 +134,12 @@ variable "appgateway_backend_connect_time_timeframe" {
variable "appgateway_backend_connect_time_threshold_critical" { variable "appgateway_backend_connect_time_threshold_critical" {
default = 50 default = 50
description = "Maximum critical backend_connect_time errors" description = "Maximum critical backend_connect_time errors in seconds"
} }
variable "appgateway_backend_connect_time_threshold_warning" { variable "appgateway_backend_connect_time_threshold_warning" {
default = 40 default = 40
description = "Warning regarding backend_connect_time errors" description = "Warning regarding backend_connect_time errors in seconds"
} }
# Monitoring App Gateway failed_requests # Monitoring App Gateway failed_requests
@ -174,12 +174,12 @@ variable "appgateway_failed_requests_timeframe" {
} }
variable "appgateway_failed_requests_threshold_critical" { variable "appgateway_failed_requests_threshold_critical" {
default = 50 default = 95
description = "Maximum critical acceptable percent of failed errors" description = "Maximum critical acceptable percent of failed errors"
} }
variable "appgateway_failed_requests_threshold_warning" { variable "appgateway_failed_requests_threshold_warning" {
default = 40 default = 80
description = "Warning regarding acceptable percent of failed errors" description = "Warning regarding acceptable percent of failed errors"
} }
@ -205,7 +205,7 @@ variable "appgateway_healthy_host_count_message" {
variable "appgateway_healthy_host_count_time_aggregator" { variable "appgateway_healthy_host_count_time_aggregator" {
description = "Monitor aggregator for App Gateway healthy host [available values: min, max or avg]" description = "Monitor aggregator for App Gateway healthy host [available values: min, max or avg]"
type = string type = string
default = "min" default = "max"
} }
variable "appgateway_healthy_host_count_timeframe" { variable "appgateway_healthy_host_count_timeframe" {
@ -246,12 +246,12 @@ variable "appgateway_http_4xx_errors_timeframe" {
} }
variable "appgateway_http_4xx_errors_threshold_critical" { variable "appgateway_http_4xx_errors_threshold_critical" {
default = 30 default = 95
description = "Minimum critical acceptable percent of 4xx error" description = "Maximum critical acceptable percent of 4xx error"
} }
variable "appgateway_http_4xx_errors_threshold_warning" { variable "appgateway_http_4xx_errors_threshold_warning" {
default = 20 default = 80
description = "Warning regarding acceptable percent of 4xx error" description = "Warning regarding acceptable percent of 4xx error"
} }
@ -287,12 +287,12 @@ variable "appgateway_http_5xx_errors_timeframe" {
} }
variable "appgateway_http_5xx_errors_threshold_critical" { variable "appgateway_http_5xx_errors_threshold_critical" {
default = 30 default = 95
description = "Minimum critical acceptable percent of 5xx error" description = "Maximum critical acceptable percent of 5xx error"
} }
variable "appgateway_http_5xx_errors_threshold_warning" { variable "appgateway_http_5xx_errors_threshold_warning" {
default = 20 default = 80
description = "Warning regarding acceptable percent of 5xx error" description = "Warning regarding acceptable percent of 5xx error"
} }
@ -328,12 +328,12 @@ variable "appgateway_backend_http_4xx_errors_timeframe" {
} }
variable "appgateway_backend_http_4xx_errors_threshold_critical" { variable "appgateway_backend_http_4xx_errors_threshold_critical" {
default = 30 default = 95
description = "Minimum critical acceptable percent of 4xx error" description = "Minimum critical acceptable percent of 4xx error"
} }
variable "appgateway_backend_http_4xx_errors_threshold_warning" { variable "appgateway_backend_http_4xx_errors_threshold_warning" {
default = 20 default = 80
description = "Warning regarding acceptable percent of 4xx error" description = "Warning regarding acceptable percent of 4xx error"
} }
@ -369,11 +369,11 @@ variable "appgateway_backend_http_5xx_errors_timeframe" {
} }
variable "appgateway_backend_http_5xx_errors_threshold_critical" { variable "appgateway_backend_http_5xx_errors_threshold_critical" {
default = 30 default = 95
description = "Minimum critical acceptable percent of 5xx error" description = "Minimum critical acceptable percent of 5xx error"
} }
variable "appgateway_backend_http_5xx_errors_threshold_warning" { variable "appgateway_backend_http_5xx_errors_threshold_warning" {
default = 20 default = 80
description = "Warning regarding acceptable percent of 5xx error" description = "Warning regarding acceptable percent of 5xx error"
} }

View File

@ -31,13 +31,13 @@ EOQ
# Monitoring App Gateway current_connections # Monitoring App Gateway current_connections
resource "datadog_monitor" "current_connection" { resource "datadog_monitor" "current_connection" {
count = var.current_connection_enabled == "true" ? 1 : 0 count = var.current_connection_enabled == "true" ? 1 : 0
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway no connection {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway has no connection"
message = coalesce(var.current_connection_message, var.message) message = coalesce(var.current_connection_message, var.message)
type = "query alert" type = "query alert"
query = <<EOQ query = <<EOQ
${var.current_connection_time_aggregator}(${var.current_connection_timeframe}): ${var.current_connection_time_aggregator}(${var.current_connection_timeframe}):
azure.network_applicationgateways.current_connections${module.filter-tags.query_alert} by {resource_group,name} < 1 azure.network_applicationgateways.current_connections${module.filter-tags.query_alert} by {resource_group,region,name} < 1
EOQ EOQ
evaluation_delay = var.evaluation_delay evaluation_delay = var.evaluation_delay
@ -60,13 +60,13 @@ EOQ
# Monitoring App Gateway backend_connect_time # Monitoring App Gateway backend_connect_time
resource "datadog_monitor" "appgateway_backend_connect_time" { resource "datadog_monitor" "appgateway_backend_connect_time" {
count = var.appgateway_backend_connect_time_enabled == "true" ? 1 : 0 count = var.appgateway_backend_connect_time_enabled == "true" ? 1 : 0
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway backend connect time {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway backend connect time is too high {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}"
message = coalesce(var.appgateway_backend_connect_time_message, var.message) message = coalesce(var.appgateway_backend_connect_time_message, var.message)
type = "query alert" type = "query alert"
query = <<EOQ query = <<EOQ
${var.appgateway_backend_connect_time_time_aggregator}(${var.appgateway_backend_connect_time_timeframe}): ${var.appgateway_backend_connect_time_time_aggregator}(${var.appgateway_backend_connect_time_timeframe}):
sum:azure.network_applicationgateways.backend_connect_time${module.filter-tags.query_alert} by {resource_group,region,name,backendserver} > ${var.appgateway_backend_connect_time_threshold_critical} sum:azure.network_applicationgateways.backend_connect_time${module.filter-tags.query_alert} by {resource_group,region,name,backendhttpsetting,backendpool,backendserver} > ${var.appgateway_backend_connect_time_threshold_critical}
EOQ EOQ
thresholds = { thresholds = {
@ -100,8 +100,8 @@ resource "datadog_monitor" "appgateway_failed_requests" {
query = <<EOQ query = <<EOQ
${var.appgateway_failed_requests_time_aggregator}(${var.appgateway_failed_requests_timeframe}): ${var.appgateway_failed_requests_time_aggregator}(${var.appgateway_failed_requests_timeframe}):
default((default(avg:azure.network_applicationgateways.failed_requests${module.filter-tags.query_alert} by {resource_group,region,name}.as_rate(), 0) / default((default(avg:azure.network_applicationgateways.failed_requests${module.filter-tags.query_alert} by {resource_group,region,name,backendsettingspool}.as_rate(), 0) /
default(avg:azure.network_applicationgateways.total_requests${module.filter-tags.query_alert} by {resource_group,region,name}.as_rate(),0) default(avg:azure.network_applicationgateways.total_requests${module.filter-tags.query_alert} by {resource_group,region,name,backendsettingspool}.as_rate(),0)
* 100),0) > ${var.appgateway_failed_requests_threshold_critical} * 100),0) > ${var.appgateway_failed_requests_threshold_critical}
EOQ EOQ
@ -130,13 +130,13 @@ EOQ
# Monitoring App Gateway healthy_host_count # Monitoring App Gateway healthy_host_count
resource "datadog_monitor" "appgateway_healthy_host_count" { resource "datadog_monitor" "appgateway_healthy_host_count" {
count = var.appgateway_healthy_host_count_enabled == "true" ? 1 : 0 count = var.appgateway_healthy_host_count_enabled == "true" ? 1 : 0
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway no healthy host {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway backend has no healthy host"
message = coalesce(var.appgateway_healthy_host_count_message, var.message) message = coalesce(var.appgateway_healthy_host_count_message, var.message)
type = "query alert" type = "query alert"
query = <<EOQ query = <<EOQ
${var.appgateway_healthy_host_count_time_aggregator}(${var.appgateway_healthy_host_count_timeframe}): ${var.appgateway_healthy_host_count_time_aggregator}(${var.appgateway_healthy_host_count_timeframe}):
sum:azure.network_applicationgateways.healthy_host_count${module.filter-tags.query_alert} by {resource_group,region,name} < 1 sum:azure.network_applicationgateways.healthy_host_count${module.filter-tags.query_alert} by {resource_group,region,name,backendsettingspool} < 1
EOQ EOQ
evaluation_delay = var.evaluation_delay evaluation_delay = var.evaluation_delay
@ -159,7 +159,7 @@ EOQ
# Monitoring App Gateway response_status 4xx # Monitoring App Gateway response_status 4xx
resource "datadog_monitor" "appgateway_http_4xx_errors" { resource "datadog_monitor" "appgateway_http_4xx_errors" {
count = var.appgateway_http_4xx_errors_enabled == "true" ? 1 : 0 count = var.appgateway_http_4xx_errors_enabled == "true" ? 1 : 0
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway HTTP 4xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway HTTP 4xx errors rate is too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
message = coalesce(var.appgateway_http_4xx_errors_message, var.message) message = coalesce(var.appgateway_http_4xx_errors_message, var.message)
type = "query alert" type = "query alert"
@ -194,7 +194,7 @@ EOQ
# Monitoring App Gateway response_status 5xx # Monitoring App Gateway response_status 5xx
resource "datadog_monitor" "appgateway_http_5xx_errors" { resource "datadog_monitor" "appgateway_http_5xx_errors" {
count = var.appgateway_http_5xx_errors_enabled == "true" ? 1 : 0 count = var.appgateway_http_5xx_errors_enabled == "true" ? 1 : 0
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway HTTP 5xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway HTTP 5xx errors rate is too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
message = coalesce(var.appgateway_http_5xx_errors_message, var.message) message = coalesce(var.appgateway_http_5xx_errors_message, var.message)
type = "query alert" type = "query alert"
@ -228,14 +228,14 @@ EOQ
# Monitoring App Gateway Backend response_status 4xx # Monitoring App Gateway Backend response_status 4xx
resource "datadog_monitor" "appgateway_backend_http_4xx_errors" { resource "datadog_monitor" "appgateway_backend_http_4xx_errors" {
count = var.appgateway_backend_http_4xx_errors_enabled == "true" ? 1 : 0 count = var.appgateway_backend_http_4xx_errors_enabled == "true" ? 1 : 0
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway Backend HTTP 4xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway backend HTTP 4xx errors rate is too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
message = coalesce(var.appgateway_backend_http_4xx_errors_message, var.message) message = coalesce(var.appgateway_backend_http_4xx_errors_message, var.message)
type = "query alert" type = "query alert"
query = <<EOQ query = <<EOQ
${var.appgateway_backend_http_4xx_errors_time_aggregator}(${var.appgateway_backend_http_4xx_errors_timeframe}): ${var.appgateway_backend_http_4xx_errors_time_aggregator}(${var.appgateway_backend_http_4xx_errors_timeframe}):
default((default(sum:azure.network_applicationgateways.backend_response_status${module.filter-tags-backend-4xx-error.query_alert} by {resource_group,region,name,backendserver}.as_rate(), 0) / default((default(sum:azure.network_applicationgateways.backend_response_status${module.filter-tags-backend-4xx-error.query_alert} by {resource_group,region,name,backendhttpsetting,backendpool,backendserver}.as_rate(), 0) /
default(sum:azure.network_applicationgateways.backend_response_status${module.filter-tags.query_alert} by {resource_group,region,name,backendserver}.as_rate(),0) default(sum:azure.network_applicationgateways.backend_response_status${module.filter-tags.query_alert} by {resource_group,region,name,backendhttpsetting,backendpool,backendserver}.as_rate(),0)
* 100),0) > ${var.appgateway_backend_http_4xx_errors_threshold_critical} * 100),0) > ${var.appgateway_backend_http_4xx_errors_threshold_critical}
EOQ EOQ
@ -263,14 +263,14 @@ EOQ
# Monitoring App Gateway Backend response_status 5xx # Monitoring App Gateway Backend response_status 5xx
resource "datadog_monitor" "appgateway_backend_http_5xx_errors" { resource "datadog_monitor" "appgateway_backend_http_5xx_errors" {
count = var.appgateway_backend_http_5xx_errors_enabled == "true" ? 1 : 0 count = var.appgateway_backend_http_5xx_errors_enabled == "true" ? 1 : 0
name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway HTTP Backend 5xx errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] App Gateway backend HTTP 5xx errors rate is too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
message = coalesce(var.appgateway_backend_http_5xx_errors_message, var.message) message = coalesce(var.appgateway_backend_http_5xx_errors_message, var.message)
type = "query alert" type = "query alert"
query = <<EOQ query = <<EOQ
${var.appgateway_backend_http_5xx_errors_time_aggregator}(${var.appgateway_backend_http_5xx_errors_timeframe}): ${var.appgateway_backend_http_5xx_errors_time_aggregator}(${var.appgateway_backend_http_5xx_errors_timeframe}):
default((default(sum:azure.network_applicationgateways.backend_response_status${module.filter-tags-backend-5xx-error.query_alert} by {resource_group,region,name,backendserver}.as_rate(), 0) / default((default(sum:azure.network_applicationgateways.backend_response_status${module.filter-tags-backend-5xx-error.query_alert} by {resource_group,region,name,backendhttpsetting,backendpool,backendserver}.as_rate(), 0) /
default(sum:azure.network_applicationgateways.backend_response_status${module.filter-tags.query_alert} by {resource_group,region,name,backendserver}.as_rate(),0) default(sum:azure.network_applicationgateways.backend_response_status${module.filter-tags.query_alert} by {resource_group,region,name,backendhttpsetting,backendpool,backendserver}.as_rate(),0)
* 100),0) > ${var.appgateway_backend_http_5xx_errors_threshold_critical} * 100),0) > ${var.appgateway_backend_http_5xx_errors_threshold_critical}
EOQ EOQ