diff --git a/cloud/azure/app-services/README.md b/cloud/azure/app-services/README.md index b439492..fac9581 100644 --- a/cloud/azure/app-services/README.md +++ b/cloud/azure/app-services/README.md @@ -20,7 +20,7 @@ Creates a DataDog monitors with the following checks : * Response time * Memory usage count * HTTP 5xx requests -* HTTP 404 requests +* HTTP 4xx requests * HTTP 2xx requests Inputs @@ -34,8 +34,8 @@ Inputs | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | | http_2xx_requests_threshold_critical | Minimum critical acceptable percent of 2xx requests | string | `90` | no | | http_2xx_requests_threshold_warning | Minimum warning acceptable percent of 2xx requests | string | `95` | no | -| http_404_requests_threshold_critical | Maximum critical acceptable percent of 404 errors | string | `40` | no | -| http_404_requests_threshold_warning | Maximum warning acceptable percent of 404 errors | string | `30` | no | +| http_4xx_requests_threshold_critical | Maximum critical acceptable percent of 4xx errors | string | `40` | no | +| http_4xx_requests_threshold_warning | Maximum warning acceptable percent of 4xx errors | string | `30` | no | | http_5xx_requests_threshold_critical | Maximum critical acceptable percent of 5xx errors | string | `40` | no | | http_5xx_requests_threshold_warning | Maximum warning acceptable percent of 5xx errors | string | `30` | no | | memory_usage_threshold_critical | Alerting threshold in Mib | string | `52430000` | no | diff --git a/cloud/azure/app-services/inputs.tf b/cloud/azure/app-services/inputs.tf index bc50156..3085251 100644 --- a/cloud/azure/app-services/inputs.tf +++ b/cloud/azure/app-services/inputs.tf @@ -65,17 +65,17 @@ variable "http_5xx_requests_threshold_warning" { } ################################# -### HTTP 404 status pages ### +### HTTP 4xx status pages ### ################################# -variable "http_404_requests_threshold_critical" { +variable "http_4xx_requests_threshold_critical" { default = 30 - description = "Maximum critical acceptable percent of 404 errors" + description = "Maximum critical acceptable percent of 4xx errors" } -variable "http_404_requests_threshold_warning" { +variable "http_4xx_requests_threshold_warning" { default = 15 - description = "Maximum warning acceptable percent of 404 errors" + description = "Maximum warning acceptable percent of 4xx errors" } ################################# diff --git a/cloud/azure/app-services/monitors-app_services.tf b/cloud/azure/app-services/monitors-app_services.tf index 3f8b49b..02cf2d9 100644 --- a/cloud/azure/app-services/monitors-app_services.tf +++ b/cloud/azure/app-services/monitors-app_services.tf @@ -94,25 +94,25 @@ resource "datadog_monitor" "appservices_http_5xx_errors_count" { tags = ["env:${var.environment}", "resource:appservices", "team:azure", "provider:azure"] } -# Monitoring App Services 404 errors percent -resource "datadog_monitor" "appservices_http_404_errors_count" { - name = "[${var.environment}] App Services HTTP 404 errors is {{value}}% above the limit on {{name}}" +# Monitoring App Services 4xx errors percent +resource "datadog_monitor" "appservices_http_4xx_errors_count" { + name = "[${var.environment}] App Services HTTP 4xx errors is {{value}}% above the limit on {{name}}" type = "metric alert" message = "${var.message}" query = < ${var.http_404_requests_threshold_critical} + ) * 100 > ${var.http_4xx_requests_threshold_critical} EOF evaluation_delay = "${var.delay}" new_host_delay = "${var.delay}" thresholds { - warning = "${var.http_404_requests_threshold_warning}" - critical = "${var.http_404_requests_threshold_critical}" + warning = "${var.http_4xx_requests_threshold_warning}" + critical = "${var.http_4xx_requests_threshold_critical}" } notify_no_data = false # Will NOT notify when no data is received