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:
parent
a11b7598e8
commit
f85b57620a
@ -28,7 +28,7 @@ Inputs
|
||||
| Name | Description | Type | Default | Required |
|
||||
|------|-------------|:----:|:-----:|:-----:|
|
||||
| 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 |
|
||||
| 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 |
|
||||
@ -37,6 +37,7 @@ Inputs
|
||||
| message | Message sent when a monitor is triggered | string | - | yes |
|
||||
| latency_threshold_critical | Alerting threshold in miliseconds | string | `800` | 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
|
||||
---------------------
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
variable "environment" {
|
||||
description = "Architecture environment"
|
||||
description = "Environment"
|
||||
type = "string"
|
||||
}
|
||||
|
||||
@ -58,3 +58,8 @@ variable "http_4xx_requests_threshold_warning" {
|
||||
default = 15
|
||||
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"
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ resource "datadog_monitor" "API_http_5xx_errors_count" {
|
||||
query = <<EOF
|
||||
sum(last_5m): (
|
||||
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}
|
||||
EOF
|
||||
|
||||
@ -66,7 +66,7 @@ resource "datadog_monitor" "API_http_4xx_errors_count" {
|
||||
query = <<EOF
|
||||
sum(last_5m): (
|
||||
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}
|
||||
EOF
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user