MON-48 - Updated with new best practice
This commit is contained in:
parent
980f9cbd7f
commit
a11b7598e8
@ -1,8 +1,9 @@
|
|||||||
# Monitoring Api Gateway latency
|
# Monitoring Api Gateway latency
|
||||||
resource "datadog_monitor" "API_Gateway_latency" {
|
resource "datadog_monitor" "API_Gateway_latency" {
|
||||||
name = "[${var.environment}] API Gateway latency > ${var.latency_threshold_critical}"
|
name = "[${var.environment}] API Gateway latency {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)"
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
avg(last_5m): (
|
avg(last_5m): (
|
||||||
avg:aws.apigateway.latency{${var.filter_tags}} by {region,apiname}
|
avg:aws.apigateway.latency{${var.filter_tags}} by {region,apiname}
|
||||||
@ -28,7 +29,7 @@ resource "datadog_monitor" "API_Gateway_latency" {
|
|||||||
|
|
||||||
# Monitoring API Gateway 5xx errors percent
|
# Monitoring API Gateway 5xx errors percent
|
||||||
resource "datadog_monitor" "API_http_5xx_errors_count" {
|
resource "datadog_monitor" "API_http_5xx_errors_count" {
|
||||||
name = "[${var.environment}] API Gateway HTTP 5xx errors > ${var.http_5xx_requests_threshold_critical}%"
|
name = "[${var.environment}] API Gateway HTTP 5xx errors {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)"
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
@ -58,7 +59,7 @@ resource "datadog_monitor" "API_http_5xx_errors_count" {
|
|||||||
|
|
||||||
# Monitoring API Gateway 4xx errors percent
|
# Monitoring API Gateway 4xx errors percent
|
||||||
resource "datadog_monitor" "API_http_4xx_errors_count" {
|
resource "datadog_monitor" "API_http_4xx_errors_count" {
|
||||||
name = "[${var.environment}] API Gateway HTTP 4xx errors > ${var.http_4xx_requests_threshold_critical}%"
|
name = "[${var.environment}] API Gateway HTTP 4xx errors {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)"
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user