From 190f56bb17db8f7d7bc37723dd5f6431fb5b5db2 Mon Sep 17 00:00:00 2001 From: Laurent Piroelle Date: Tue, 9 Jan 2018 11:52:50 +0100 Subject: [PATCH] MON-99 : Azure App Service monitor : count 2xx & 3xx http status codes as successful --- cloud/azure/README.md | 4 ++-- cloud/azure/app-services/README.md | 4 ++-- cloud/azure/app-services/inputs.tf | 8 ++++---- .../app-services/monitors-app_services.tf | 15 +++++++------- cloud/azure/inputs.tf | 8 ++++---- cloud/azure/monitors.tf | 20 +++++++++---------- 6 files changed, 30 insertions(+), 29 deletions(-) diff --git a/cloud/azure/README.md b/cloud/azure/README.md index 5d0cac8..05bc25d 100644 --- a/cloud/azure/README.md +++ b/cloud/azure/README.md @@ -35,8 +35,8 @@ Inputs | apimanagement_other_requests_threshold_critical | Maximum acceptable percent of other requests | string | `5` | no | | apimanagement_successful_requests_threshold_critical | Minimum acceptable percent of successful requests | string | `90` | no | | apimanagement_unauthorized_requests_threshold_critical | Maximum acceptable percent of unauthorized requests | string | `5` | no | -| appservices_http_2xx_requests_threshold_critical | Minimum critical acceptable percent of 2xx requests | string | `90` | no | -| appservices_http_2xx_requests_threshold_warning | Minimum warning acceptable percent of 2xx requests | string | `95` | no | +| appservices_http_successful_requests_threshold_critical | Minimum critical acceptable percent of 2xx & 3xx requests | string | `90` | no | +| appservices_http_successful_requests_threshold_warning | Minimum warning acceptable percent of 2xx & 3xx requests | string | `95` | no | | appservices_http_4xx_requests_threshold_critical | Maximum critical acceptable percent of 4xx errors | string | `30` | no | | appservices_http_4xx_requests_threshold_warning | Maximum warning acceptable percent of 4xx errors | string | `15` | no | | appservices_http_5xx_requests_threshold_critical | Maximum critical acceptable percent of 5xx errors | string | `20` | no | diff --git a/cloud/azure/app-services/README.md b/cloud/azure/app-services/README.md index dc9e526..40eb946 100644 --- a/cloud/azure/app-services/README.md +++ b/cloud/azure/app-services/README.md @@ -32,8 +32,8 @@ Inputs | 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 | -| 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_successful_requests_threshold_critical | Minimum critical acceptable percent of 2xx & 3xx requests | string | `90` | no | +| http_successful_requests_threshold_warning | Minimum warning acceptable percent of 2xx & 3xx requests | string | `95` | no | | http_4xx_requests_threshold_critical | Maximum critical acceptable percent of 4xx errors | string | `30` | no | | http_4xx_requests_threshold_warning | Maximum warning acceptable percent of 4xx errors | string | `15` | no | | http_5xx_requests_threshold_critical | Maximum critical acceptable percent of 5xx errors | string | `20` | no | diff --git a/cloud/azure/app-services/inputs.tf b/cloud/azure/app-services/inputs.tf index 3085251..ab9ea74 100644 --- a/cloud/azure/app-services/inputs.tf +++ b/cloud/azure/app-services/inputs.tf @@ -82,12 +82,12 @@ variable "http_4xx_requests_threshold_warning" { ### HTTP 2xx status pages ### ################################# -variable "http_2xx_requests_threshold_critical" { +variable "http_successful_requests_threshold_critical" { default = 90 - description = "Minimum critical acceptable percent of 2xx requests" + description = "Minimum critical acceptable percent of 2xx & 3xx requests" } -variable "http_2xx_requests_threshold_warning" { +variable "http_successful_requests_threshold_warning" { default = 95 - description = "Minimum warning acceptable percent of 2xx requests" + description = "Minimum warning acceptable percent of 2xx & 3xx requests" } diff --git a/cloud/azure/app-services/monitors-app_services.tf b/cloud/azure/app-services/monitors-app_services.tf index 02cf2d9..095ef12 100644 --- a/cloud/azure/app-services/monitors-app_services.tf +++ b/cloud/azure/app-services/monitors-app_services.tf @@ -124,25 +124,26 @@ resource "datadog_monitor" "appservices_http_4xx_errors_count" { tags = ["env:${var.environment}", "resource:appservices", "team:azure", "provider:azure"] } -# Monitoring App Services HTTP 2xx status pages percent -resource "datadog_monitor" "appservices_http_2xx_status_rate" { - name = "[${var.environment}] App Services HTTP 2xx responses is {{value}}% below the limit on {{name}}" +# Monitoring App Services HTTP 2xx & 3xx status pages percent +resource "datadog_monitor" "appservices_http_success_status_rate" { + name = "[${var.environment}] App Services HTTP successful responses is {{value}}% below the limit on {{name}}" type = "metric alert" message = "${var.message}" query = <