From 192aed933374dc63150bda1d855084614fd6d3fe Mon Sep 17 00:00:00 2001 From: Alexandre Gaillet Date: Tue, 20 Mar 2018 17:23:44 +0100 Subject: [PATCH] MON-139 - Updated AWS monitors name with new best practice --- cloud/aws/apigateway/monitors-api.tf | 6 +++--- cloud/aws/elasticsearch/monitors-elasticsearch.tf | 4 ++-- cloud/aws/elb/monitors-elb.tf | 10 +++++----- cloud/aws/rds/monitors-rds.tf | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cloud/aws/apigateway/monitors-api.tf b/cloud/aws/apigateway/monitors-api.tf index 2ed22ad..9466e82 100644 --- a/cloud/aws/apigateway/monitors-api.tf +++ b/cloud/aws/apigateway/monitors-api.tf @@ -1,6 +1,6 @@ # Monitoring Api Gateway latency resource "datadog_monitor" "API_Gateway_latency" { - name = "[${var.environment}] API Gateway latency {{comparator}} {{#is_alert}}{{threshold}}ms{{/is_alert}}{{#is_warning}}{{warn_threshold}}ms{{/is_warning}} ({{value}}ms)" + name = "[${var.environment}] API Gateway latency {{#is_alert}}{{comparator}}{{threshold}}ms ({{value}}ms){{/is_alert}}{{#is_warning}}{{comparator}}{{warn_threshold}}ms ({{value}}ms){{/is_warning}}" type = "metric alert" message = "${var.message}" @@ -29,7 +29,7 @@ resource "datadog_monitor" "API_Gateway_latency" { # Monitoring API Gateway 5xx errors percent resource "datadog_monitor" "API_http_5xx_errors_count" { - name = "[${var.environment}] API Gateway HTTP 5xx errors {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)" + name = "[${var.environment}] API Gateway HTTP 5xx errors {{#is_alert}}{{comparator}}{{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}}{{warn_threshold}}% ({{value}}%){{/is_warning}}" type = "metric alert" message = "${var.message}" @@ -59,7 +59,7 @@ resource "datadog_monitor" "API_http_5xx_errors_count" { # Monitoring API Gateway 4xx errors percent resource "datadog_monitor" "API_http_4xx_errors_count" { - name = "[${var.environment}] API Gateway HTTP 4xx errors {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)" + name = "[${var.environment}] API Gateway HTTP 4xx errors {{#is_alert}}{{comparator}}{{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}}{{warn_threshold}}% ({{value}}%){{/is_warning}}" type = "metric alert" message = "${var.message}" diff --git a/cloud/aws/elasticsearch/monitors-elasticsearch.tf b/cloud/aws/elasticsearch/monitors-elasticsearch.tf index b665926..de02a9d 100644 --- a/cloud/aws/elasticsearch/monitors-elasticsearch.tf +++ b/cloud/aws/elasticsearch/monitors-elasticsearch.tf @@ -42,7 +42,7 @@ EOF ### Elasticsearch cluster free storage space monitor ### resource "datadog_monitor" "es_free_space_low" { - name = "[${var.environment}] ElasticSearch cluster free storage space {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)" + name = "[${var.environment}] ElasticSearch cluster free storage space {{#is_alert}}{{comparator}}{{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}}{{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${var.message}" type = "query alert" @@ -75,7 +75,7 @@ EOF ### Elasticsearch cluster CPU monitor ### resource "datadog_monitor" "es_cpu_90_15min" { - name = "[${var.environment}] ElasticSearch cluster CPU high {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)" + name = "[${var.environment}] ElasticSearch cluster CPU high {{#is_alert}}{{comparator}}{{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}}{{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${var.message}" type = "query alert" diff --git a/cloud/aws/elb/monitors-elb.tf b/cloud/aws/elb/monitors-elb.tf index 70a316e..f9d6249 100644 --- a/cloud/aws/elb/monitors-elb.tf +++ b/cloud/aws/elb/monitors-elb.tf @@ -33,7 +33,7 @@ resource "datadog_monitor" "ELB_no_healthy_instances" { } resource "datadog_monitor" "ELB_too_much_4xx" { - name = "[${var.environment}] ELB 4xx errors too high {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)" + name = "[${var.environment}] ELB 4xx errors too high {{#is_alert}}{{comparator}}{{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}}{{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${var.message}" query = <