From 2680f12280644c369c322246c96dbf8933325247 Mon Sep 17 00:00:00 2001 From: Laurent Piroelle Date: Fri, 15 Dec 2017 17:04:33 +0100 Subject: [PATCH] MON-73 Update app-services monitors input mapping --- cloud/azure/README.md | 12 ++++++------ cloud/azure/inputs.tf | 38 ++++++++++++++++++++------------------ cloud/azure/monitors.tf | 20 ++++++++++---------- 3 files changed, 36 insertions(+), 34 deletions(-) diff --git a/cloud/azure/README.md b/cloud/azure/README.md index 5dcff20..124fd89 100644 --- a/cloud/azure/README.md +++ b/cloud/azure/README.md @@ -35,12 +35,12 @@ 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_status_rate_limit | | string | `30` | no | -| appservices_http_2xx_status_rate_threshold_critical | Alerting threshold (percentage) | string | `0.9` | no | -| appservices_http_2xx_status_rate_threshold_warning | Warning threshold (percentage) | string | `0.95` | no | -| appservices_http_404_errors_count_rate_limit | | string | `30` | no | -| appservices_http_404_errors_count_rate_threshold_critical | Alerting threshold (number of requests) | string | `30` | no | -| appservices_http_404_errors_count_rate_threshold_warning | Warning threshold (number of requests) | string | `10` | 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_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 | +| appservices_http_5xx_requests_threshold_warning | Maximum warning acceptable percent of 5xx errors | string | `10` | no | | appservices_memory_usage_threshold_critical | Alerting threshold in Mib | string | `52430000` | no | | appservices_memory_usage_threshold_warning | Warning threshold in MiB | string | `33550000` | no | | appservices_response_time_threshold_critical | Alerting threshold in seconds | string | `0.8` | no | diff --git a/cloud/azure/inputs.tf b/cloud/azure/inputs.tf index 5526988..cf4510a 100644 --- a/cloud/azure/inputs.tf +++ b/cloud/azure/inputs.tf @@ -70,32 +70,34 @@ variable "appservices_memory_usage_threshold_warning" { description = "Warning threshold in MiB" } -variable "appservices_http_404_errors_count_rate_limit" { - default = 30 -} - -variable "appservices_http_404_errors_count_rate_threshold_critical" { +variable "appservices_http_4xx_requests_threshold_critical" { default = 30 - description = "Alerting threshold (number of requests)" + description = "Maximum critical acceptable percent of 4xx errors" } -variable "appservices_http_404_errors_count_rate_threshold_warning" { +variable "appservices_http_4xx_requests_threshold_warning" { + default = 15 + description = "Maximum warning acceptable percent of 4xx errors" +} + +variable "appservices_http_5xx_requests_threshold_critical" { + default = 20 + description = "Maximum critical acceptable percent of 5xx errors" +} + +variable "appservices_http_5xx_requests_threshold_warning" { default = 10 - description = "Warning threshold (number of requests)" + description = "Maximum warning acceptable percent of 5xx errors" } -variable "appservices_http_2xx_status_rate_limit" { - default = 30 +variable "appservices_http_2xx_requests_threshold_critical" { + default = 90 + description = "Minimum critical acceptable percent of 2xx requests" } -variable "appservices_http_2xx_status_rate_threshold_critical" { - default = 0.9 - description = "Alerting threshold (percentage)" -} - -variable "appservices_http_2xx_status_rate_threshold_warning" { - default = 0.95 - description = "Warning threshold (percentage)" +variable "appservices_http_2xx_requests_threshold_warning" { + default = 95 + description = "Minimum warning acceptable percent of 2xx requests" } # Azure Event Hub specific variables diff --git a/cloud/azure/monitors.tf b/cloud/azure/monitors.tf index 356d6c9..fc9aeee 100644 --- a/cloud/azure/monitors.tf +++ b/cloud/azure/monitors.tf @@ -24,16 +24,16 @@ module "appservices" { filter_tags_use_defaults = "${var.filter_tags_use_defaults}" filter_tags_custom = "${var.filter_tags_custom}" - http_2xx_status_rate_limit = "${var.appservices_http_2xx_status_rate_limit}" - http_2xx_status_rate_threshold_critical = "${var.appservices_http_2xx_status_rate_threshold_critical}" - http_2xx_status_rate_threshold_warning = "${var.appservices_http_2xx_status_rate_threshold_warning}" - http_404_errors_count_rate_limit = "${var.appservices_http_404_errors_count_rate_limit}" - http_404_errors_count_rate_threshold_critical = "${var.appservices_http_404_errors_count_rate_threshold_critical}" - http_404_errors_count_rate_threshold_warning = "${var.appservices_http_404_errors_count_rate_threshold_warning}" - memory_usage_threshold_critical = "${var.appservices_memory_usage_threshold_critical}" - memory_usage_threshold_warning = "${var.appservices_memory_usage_threshold_warning}" - response_time_threshold_critical = "${var.appservices_response_time_threshold_critical}" - response_time_threshold_warning = "${var.appservices_response_time_threshold_warning}" + http_2xx_requests_threshold_critical = "${var.appservices_http_2xx_requests_threshold_critical}" + http_2xx_requests_threshold_warning = "${var.appservices_http_2xx_requests_threshold_warning}" + http_5xx_requests_threshold_critical = "${var.appservices_http_5xx_requests_threshold_critical}" + http_5xx_requests_threshold_warning = "${var.appservices_http_5xx_requests_threshold_warning}" + http_4xx_requests_threshold_critical = "${var.appservices_http_4xx_requests_threshold_critical}" + http_4xx_requests_threshold_warning = "${var.appservices_http_4xx_requests_threshold_warning}" + memory_usage_threshold_critical = "${var.appservices_memory_usage_threshold_critical}" + memory_usage_threshold_warning = "${var.appservices_memory_usage_threshold_warning}" + response_time_threshold_critical = "${var.appservices_response_time_threshold_critical}" + response_time_threshold_warning = "${var.appservices_response_time_threshold_warning}" } module "eventhub" {