MON-112 terraform fmt
This commit is contained in:
parent
3cb93f967c
commit
9229ad79a5
@ -75,4 +75,3 @@ variable "httpcode_target_5xx_threshold_warning" {
|
||||
default = 60
|
||||
description = "target 5xx warning threshold in percentage"
|
||||
}
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ resource "datadog_monitor" "ALB_no_healthy_instances" {
|
||||
name = "[${var.environment}] ALB no healthy instances"
|
||||
type = "metric alert"
|
||||
message = "${var.message}"
|
||||
|
||||
query = <<EOF
|
||||
min(last_1m): (
|
||||
sum:aws.applicationelb.healthy_host_count{${var.filter_tags}} by {region,loadbalancer}
|
||||
@ -36,6 +37,7 @@ resource "datadog_monitor" "ALB_latency" {
|
||||
name = "[${var.environment}] ALB latency > ${var.latency_threshold_critical} ms"
|
||||
type = "metric alert"
|
||||
message = "${var.message}"
|
||||
|
||||
query = <<EOF
|
||||
avg(last_5m): (
|
||||
avg:aws.applicationelb.target_response_time.average{${var.filter_tags}} by {region,loadbalancer}
|
||||
@ -46,8 +48,8 @@ resource "datadog_monitor" "ALB_latency" {
|
||||
new_host_delay = "${var.delay}"
|
||||
|
||||
thresholds {
|
||||
critical = ${var.latency_threshold_critical}
|
||||
warning = ${var.latency_threshold_warning}
|
||||
critical = "${var.latency_threshold_critical}"
|
||||
warning = "${var.latency_threshold_warning}"
|
||||
}
|
||||
|
||||
notify_no_data = true # Will notify when no data is received
|
||||
@ -63,6 +65,7 @@ resource "datadog_monitor" "ALB_httpcode_elb_5xx" {
|
||||
name = "[${var.environment}] ALB HTTP code 5xx > ${var.httpcode_elb_5xx_threshold_critical} %"
|
||||
type = "metric alert"
|
||||
message = "${var.message}"
|
||||
|
||||
query = <<EOF
|
||||
sum(last_5m): (
|
||||
avg:aws.applicationelb.httpcode_elb_5xx{${var.filter_tags}} by {region,loadbalancer}.as_count() /
|
||||
@ -74,8 +77,8 @@ resource "datadog_monitor" "ALB_httpcode_elb_5xx" {
|
||||
new_host_delay = "${var.delay}"
|
||||
|
||||
thresholds {
|
||||
critical = ${var.httpcode_elb_5xx_threshold_critical}
|
||||
warning = ${var.httpcode_elb_5xx_threshold_warning}
|
||||
critical = "${var.httpcode_elb_5xx_threshold_critical}"
|
||||
warning = "${var.httpcode_elb_5xx_threshold_warning}"
|
||||
}
|
||||
|
||||
notify_no_data = false # Will notify when no data is received
|
||||
@ -91,6 +94,7 @@ resource "datadog_monitor" "ALB_httpcode_elb_4xx" {
|
||||
name = "[${var.environment}] ALB HTTP code 4xx > ${var.httpcode_elb_4xx_threshold_critical} %"
|
||||
type = "metric alert"
|
||||
message = "${var.message}"
|
||||
|
||||
query = <<EOF
|
||||
sum(last_5m): (
|
||||
avg:aws.applicationelb.httpcode_elb_4xx{${var.filter_tags}} by {region,loadbalancer}.as_count() /
|
||||
@ -102,8 +106,8 @@ resource "datadog_monitor" "ALB_httpcode_elb_4xx" {
|
||||
new_host_delay = "${var.delay}"
|
||||
|
||||
thresholds {
|
||||
critical = ${var.httpcode_elb_4xx_threshold_critical}
|
||||
warning = ${var.httpcode_elb_4xx_threshold_warning}
|
||||
critical = "${var.httpcode_elb_4xx_threshold_critical}"
|
||||
warning = "${var.httpcode_elb_4xx_threshold_warning}"
|
||||
}
|
||||
|
||||
notify_no_data = false # Will notify when no data is received
|
||||
@ -119,6 +123,7 @@ resource "datadog_monitor" "ALB_httpcode_target_5xx" {
|
||||
name = "[${var.environment}] ALB target HTTP code 5xx > ${var.httpcode_target_5xx_threshold_critical} %"
|
||||
type = "metric alert"
|
||||
message = "${var.message}"
|
||||
|
||||
query = <<EOF
|
||||
sum(last_5m): (
|
||||
avg:aws.applicationelb.httpcode_target_5xx{${var.filter_tags}} by {region,loadbalancer}.as_count() /
|
||||
@ -130,8 +135,8 @@ resource "datadog_monitor" "ALB_httpcode_target_5xx" {
|
||||
new_host_delay = "${var.delay}"
|
||||
|
||||
thresholds {
|
||||
critical = ${var.httpcode_target_5xx_threshold_critical}
|
||||
warning = ${var.httpcode_target_5xx_threshold_warning}
|
||||
critical = "${var.httpcode_target_5xx_threshold_critical}"
|
||||
warning = "${var.httpcode_target_5xx_threshold_warning}"
|
||||
}
|
||||
|
||||
notify_no_data = false # Will notify when no data is received
|
||||
@ -147,6 +152,7 @@ resource "datadog_monitor" "ALB_httpcode_target_4xx" {
|
||||
name = "[${var.environment}] ALB target HTTP code 4xx > ${var.httpcode_target_4xx_threshold_critical} %"
|
||||
type = "metric alert"
|
||||
message = "${var.message}"
|
||||
|
||||
query = <<EOF
|
||||
sum(last_5m): (
|
||||
avg:aws.applicationelb.httpcode_target_4xx{${var.filter_tags}} by {region,loadbalancer}.as_count() /
|
||||
@ -158,8 +164,8 @@ resource "datadog_monitor" "ALB_httpcode_target_4xx" {
|
||||
new_host_delay = "${var.delay}"
|
||||
|
||||
thresholds {
|
||||
critical = ${var.httpcode_target_4xx_threshold_critical}
|
||||
warning = ${var.httpcode_target_4xx_threshold_warning}
|
||||
critical = "${var.httpcode_target_4xx_threshold_critical}"
|
||||
warning = "${var.httpcode_target_4xx_threshold_warning}"
|
||||
}
|
||||
|
||||
notify_no_data = false # Will notify when no data is received
|
||||
@ -170,4 +176,3 @@ resource "datadog_monitor" "ALB_httpcode_target_4xx" {
|
||||
|
||||
tags = ["env:${var.environment}", "resource:alb", "team:aws", "provider:aws"]
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user