MON-48: Added artificial_requests_count to mitigate false positive in case of low trafic

MON-48: format issue

MON-48: format issue

MON-48: changed variable name

MON-48: changed variable name

MON-48: renamed to artificial_requests_count
This commit is contained in:
Boris Rousseau 2018-02-26 09:53:05 +01:00
parent a11b7598e8
commit f85b57620a
3 changed files with 10 additions and 4 deletions

View File

@ -28,7 +28,7 @@ Inputs
| Name | Description | Type | Default | Required | | Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:| |------|-------------|:----:|:-----:|:-----:|
| delay | Delay in seconds for the metric evaluation | string | `900` | no | | delay | Delay in seconds for the metric evaluation | string | `900` | no |
| environment | Architecture environment | string | - | yes | | environment | Environment | string | - | yes |
| filter_tags | Tags used for custom filtering | string | `*` | no | | filter_tags | Tags used for custom filtering | string | `*` | no |
| http_4xx_requests_threshold_critical | Maximum critical acceptable percent of 4xx errors | string | `30` | 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_4xx_requests_threshold_warning | Maximum warning acceptable percent of 4xx errors | string | `15` | no |
@ -37,6 +37,7 @@ Inputs
| message | Message sent when a monitor is triggered | string | - | yes | | message | Message sent when a monitor is triggered | string | - | yes |
| latency_threshold_critical | Alerting threshold in miliseconds | string | `800` | no | | latency_threshold_critical | Alerting threshold in miliseconds | string | `800` | no |
| latency_threshold_warning | Warning threshold in miliseconds | string | `400` | no | | latency_threshold_warning | Warning threshold in miliseconds | string | `400` | no |
| artificial_requests_count | Number of false requests used to mitigate false positive in case of low trafic | string | `0` | no |
Related documentation Related documentation
--------------------- ---------------------

View File

@ -1,5 +1,5 @@
variable "environment" { variable "environment" {
description = "Architecture environment" description = "Environment"
type = "string" type = "string"
} }
@ -58,3 +58,8 @@ variable "http_4xx_requests_threshold_warning" {
default = 15 default = 15
description = "Maximum warning acceptable percent of 4xx errors" description = "Maximum warning acceptable percent of 4xx errors"
} }
variable "artificial_requests_count" {
default = 0
description = "Number of false requests used to mitigate false positive in case of low trafic"
}

View File

@ -36,7 +36,7 @@ resource "datadog_monitor" "API_http_5xx_errors_count" {
query = <<EOF query = <<EOF
sum(last_5m): ( sum(last_5m): (
avg:aws.apigateway.5xxerror{${var.filter_tags}} by {region,apiname}.as_count() / avg:aws.apigateway.5xxerror{${var.filter_tags}} by {region,apiname}.as_count() /
avg:aws.apigateway.count{${var.filter_tags}} by {region,apiname}.as_count() (avg:aws.apigateway.count{${var.filter_tags}} by {region,apiname}.as_count() + ${var.artificial_requests_count})
) * 100 > ${var.http_5xx_requests_threshold_critical} ) * 100 > ${var.http_5xx_requests_threshold_critical}
EOF EOF
@ -66,7 +66,7 @@ resource "datadog_monitor" "API_http_4xx_errors_count" {
query = <<EOF query = <<EOF
sum(last_5m): ( sum(last_5m): (
avg:aws.apigateway.4xxerror{${var.filter_tags}} by {region,apiname}.as_count() / avg:aws.apigateway.4xxerror{${var.filter_tags}} by {region,apiname}.as_count() /
avg:aws.apigateway.count{${var.filter_tags}} by {region,apiname}.as_count() (avg:aws.apigateway.count{${var.filter_tags}} by {region,apiname}.as_count() + ${var.artificial_requests_count})
) * 100 > ${var.http_4xx_requests_threshold_critical} ) * 100 > ${var.http_4xx_requests_threshold_critical}
EOF EOF