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
|
default = 60
|
||||||
description = "target 5xx warning threshold in percentage"
|
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"
|
name = "[${var.environment}] ALB no healthy instances"
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
min(last_1m): (
|
min(last_1m): (
|
||||||
sum:aws.applicationelb.healthy_host_count{${var.filter_tags}} by {region,loadbalancer}
|
sum:aws.applicationelb.healthy_host_count{${var.filter_tags}} by {region,loadbalancer}
|
||||||
@ -23,7 +24,7 @@ resource "datadog_monitor" "ALB_no_healthy_instances" {
|
|||||||
critical = 0
|
critical = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_no_data = true # Will notify when no data is received
|
notify_no_data = true # Will notify when no data is received
|
||||||
renotify_interval = 0
|
renotify_interval = 0
|
||||||
require_full_window = false
|
require_full_window = false
|
||||||
timeout_h = 0
|
timeout_h = 0
|
||||||
@ -36,6 +37,7 @@ resource "datadog_monitor" "ALB_latency" {
|
|||||||
name = "[${var.environment}] ALB latency > ${var.latency_threshold_critical} ms"
|
name = "[${var.environment}] ALB latency > ${var.latency_threshold_critical} ms"
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
avg(last_5m): (
|
avg(last_5m): (
|
||||||
avg:aws.applicationelb.target_response_time.average{${var.filter_tags}} by {region,loadbalancer}
|
avg:aws.applicationelb.target_response_time.average{${var.filter_tags}} by {region,loadbalancer}
|
||||||
@ -46,11 +48,11 @@ resource "datadog_monitor" "ALB_latency" {
|
|||||||
new_host_delay = "${var.delay}"
|
new_host_delay = "${var.delay}"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
critical = ${var.latency_threshold_critical}
|
critical = "${var.latency_threshold_critical}"
|
||||||
warning = ${var.latency_threshold_warning}
|
warning = "${var.latency_threshold_warning}"
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_no_data = true # Will notify when no data is received
|
notify_no_data = true # Will notify when no data is received
|
||||||
renotify_interval = 0
|
renotify_interval = 0
|
||||||
require_full_window = false
|
require_full_window = false
|
||||||
timeout_h = 0
|
timeout_h = 0
|
||||||
@ -63,6 +65,7 @@ resource "datadog_monitor" "ALB_httpcode_elb_5xx" {
|
|||||||
name = "[${var.environment}] ALB HTTP code 5xx > ${var.httpcode_elb_5xx_threshold_critical} %"
|
name = "[${var.environment}] ALB HTTP code 5xx > ${var.httpcode_elb_5xx_threshold_critical} %"
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
sum(last_5m): (
|
sum(last_5m): (
|
||||||
avg:aws.applicationelb.httpcode_elb_5xx{${var.filter_tags}} by {region,loadbalancer}.as_count() /
|
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}"
|
new_host_delay = "${var.delay}"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
critical = ${var.httpcode_elb_5xx_threshold_critical}
|
critical = "${var.httpcode_elb_5xx_threshold_critical}"
|
||||||
warning = ${var.httpcode_elb_5xx_threshold_warning}
|
warning = "${var.httpcode_elb_5xx_threshold_warning}"
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_no_data = false # Will notify when no data is received
|
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} %"
|
name = "[${var.environment}] ALB HTTP code 4xx > ${var.httpcode_elb_4xx_threshold_critical} %"
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
sum(last_5m): (
|
sum(last_5m): (
|
||||||
avg:aws.applicationelb.httpcode_elb_4xx{${var.filter_tags}} by {region,loadbalancer}.as_count() /
|
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}"
|
new_host_delay = "${var.delay}"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
critical = ${var.httpcode_elb_4xx_threshold_critical}
|
critical = "${var.httpcode_elb_4xx_threshold_critical}"
|
||||||
warning = ${var.httpcode_elb_4xx_threshold_warning}
|
warning = "${var.httpcode_elb_4xx_threshold_warning}"
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_no_data = false # Will notify when no data is received
|
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} %"
|
name = "[${var.environment}] ALB target HTTP code 5xx > ${var.httpcode_target_5xx_threshold_critical} %"
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
sum(last_5m): (
|
sum(last_5m): (
|
||||||
avg:aws.applicationelb.httpcode_target_5xx{${var.filter_tags}} by {region,loadbalancer}.as_count() /
|
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}"
|
new_host_delay = "${var.delay}"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
critical = ${var.httpcode_target_5xx_threshold_critical}
|
critical = "${var.httpcode_target_5xx_threshold_critical}"
|
||||||
warning = ${var.httpcode_target_5xx_threshold_warning}
|
warning = "${var.httpcode_target_5xx_threshold_warning}"
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_no_data = false # Will notify when no data is received
|
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} %"
|
name = "[${var.environment}] ALB target HTTP code 4xx > ${var.httpcode_target_4xx_threshold_critical} %"
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
sum(last_5m): (
|
sum(last_5m): (
|
||||||
avg:aws.applicationelb.httpcode_target_4xx{${var.filter_tags}} by {region,loadbalancer}.as_count() /
|
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}"
|
new_host_delay = "${var.delay}"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
critical = ${var.httpcode_target_4xx_threshold_critical}
|
critical = "${var.httpcode_target_4xx_threshold_critical}"
|
||||||
warning = ${var.httpcode_target_4xx_threshold_warning}
|
warning = "${var.httpcode_target_4xx_threshold_warning}"
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_no_data = false # Will notify when no data is received
|
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"]
|
tags = ["env:${var.environment}", "resource:alb", "team:aws", "provider:aws"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user