MON-112 add artificial request for false positive mitigation
This commit is contained in:
parent
a8fc9279ab
commit
cc0e970dda
@ -147,3 +147,8 @@ variable "httpcode_target_5xx_threshold_warning" {
|
||||
default = 60
|
||||
description = "target 5xx warning threshold in percentage"
|
||||
}
|
||||
|
||||
variable "artificial_requests_count" {
|
||||
default = 5
|
||||
description = "Number of false requests used to mitigate false positive in case of low trafic"
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ resource "datadog_monitor" "ALB_httpcode_elb_5xx" {
|
||||
sum(last_5m): (
|
||||
default(
|
||||
avg:aws.applicationelb.httpcode_elb_5xx{${data.template_file.filter.rendered}} by {region,loadbalancer}.as_count() /
|
||||
avg:aws.applicationelb.request_count{${data.template_file.filter.rendered}} by {region,loadbalancer}.as_count(),
|
||||
(avg:aws.applicationelb.request_count{${data.template_file.filter.rendered}} by {region,loadbalancer}.as_count() + ${var.artificial_requests_count}),
|
||||
0) * 100
|
||||
) > ${var.httpcode_elb_5xx_threshold_critical}
|
||||
EOF
|
||||
@ -109,7 +109,7 @@ resource "datadog_monitor" "ALB_httpcode_elb_4xx" {
|
||||
sum(last_5m): (
|
||||
default(
|
||||
avg:aws.applicationelb.httpcode_elb_4xx{${data.template_file.filter.rendered}} by {region,loadbalancer}.as_count() /
|
||||
avg:aws.applicationelb.request_count{${data.template_file.filter.rendered}} by {region,loadbalancer}.as_count(),
|
||||
(avg:aws.applicationelb.request_count{${data.template_file.filter.rendered}} by {region,loadbalancer}.as_count() + ${var.artificial_requests_count}),
|
||||
0) * 100
|
||||
) > ${var.httpcode_elb_4xx_threshold_critical}
|
||||
EOF
|
||||
@ -142,7 +142,7 @@ resource "datadog_monitor" "ALB_httpcode_target_5xx" {
|
||||
sum(last_5m): (
|
||||
default(
|
||||
avg:aws.applicationelb.httpcode_target_5xx{${data.template_file.filter.rendered}} by {region,loadbalancer}.as_count() /
|
||||
avg:aws.applicationelb.request_count{${data.template_file.filter.rendered}} by {region,loadbalancer}.as_count(),
|
||||
(avg:aws.applicationelb.request_count{${data.template_file.filter.rendered}} by {region,loadbalancer}.as_count() + ${var.artificial_requests_count}),
|
||||
0) * 100
|
||||
) > ${var.httpcode_target_5xx_threshold_critical}
|
||||
EOF
|
||||
@ -175,7 +175,7 @@ resource "datadog_monitor" "ALB_httpcode_target_4xx" {
|
||||
sum(last_5m): (
|
||||
default(
|
||||
avg:aws.applicationelb.httpcode_target_4xx{${data.template_file.filter.rendered}} by {region,loadbalancer}.as_count() /
|
||||
avg:aws.applicationelb.request_count{${data.template_file.filter.rendered}} by {region,loadbalancer}.as_count(),
|
||||
(avg:aws.applicationelb.request_count{${data.template_file.filter.rendered}} by {region,loadbalancer}.as_count() + ${var.artificial_requests_count}),
|
||||
0) * 100
|
||||
) > ${var.httpcode_target_4xx_threshold_critical}
|
||||
EOF
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user