MON-139 - Updated AWS monitors name with new best practice

This commit is contained in:
Alexandre Gaillet 2018-03-20 17:23:44 +01:00
parent 86cf2774d6
commit 192aed9333
4 changed files with 12 additions and 12 deletions

View File

@ -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}"

View File

@ -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"

View File

@ -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 = <<EOF
@ -65,7 +65,7 @@ resource "datadog_monitor" "ELB_too_much_4xx" {
}
resource "datadog_monitor" "ELB_too_much_5xx" {
name = "[${var.environment}] ELB 5xx errors too high {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)"
name = "[${var.environment}] ELB 5xx errors too high {{#is_alert}}{{comparator}}{{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}}{{warn_threshold}}% ({{value}}%){{/is_warning}}"
message = "${var.message}"
query = <<EOF
@ -97,7 +97,7 @@ resource "datadog_monitor" "ELB_too_much_5xx" {
}
resource "datadog_monitor" "ELB_too_much_4xx_backend" {
name = "[${var.environment}] ELB backend 4xx errors too high {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)"
name = "[${var.environment}] ELB backend 4xx errors too high {{#is_alert}}{{comparator}}{{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}}{{warn_threshold}}% ({{value}}%){{/is_warning}}"
message = "${var.message}"
query = <<EOF
@ -129,7 +129,7 @@ resource "datadog_monitor" "ELB_too_much_4xx_backend" {
}
resource "datadog_monitor" "ELB_too_much_5xx_backend" {
name = "[${var.environment}] ELB backend 5xx errors too high {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)"
name = "[${var.environment}] ELB backend 5xx errors too high {{#is_alert}}{{comparator}}{{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}}{{warn_threshold}}% ({{value}}%){{/is_warning}}"
message = "${var.message}"
query = <<EOF
@ -161,7 +161,7 @@ resource "datadog_monitor" "ELB_too_much_5xx_backend" {
}
resource "datadog_monitor" "ELB_backend_latency" {
name = "[${var.environment}] ELB latency too high {{comparator}} {{#is_alert}}{{threshold}}s{{/is_alert}}{{#is_warning}}{{warn_threshold}}s{{/is_warning}} ({{value}}s)"
name = "[${var.environment}] ELB latency too high {{#is_alert}}{{comparator}}{{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{comparator}}{{warn_threshold}}s ({{value}}s){{/is_warning}}"
message = "${var.message}"
query = <<EOF

View File

@ -8,7 +8,7 @@ data "template_file" "filter" {
### RDS instance CPU monitor ###
resource "datadog_monitor" "rds_cpu_90_15min" {
name = "[${var.environment}] RDS instance CPU high {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)"
name = "[${var.environment}] RDS instance CPU high {{#is_alert}}{{comparator}}{{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}}{{warn_threshold}}% ({{value}}%){{/is_warning}}"
message = "${var.message}"
type = "metric alert"
@ -39,7 +39,7 @@ EOF
### RDS instance free space monitor ###
resource "datadog_monitor" "rds_free_space_low" {
name = "[${var.environment}] RDS instance free space {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)"
name = "[${var.environment}] RDS instance free space {{#is_alert}}{{comparator}}{{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{comparator}}{{warn_threshold}}% ({{value}}%){{/is_warning}}"
message = "${var.message}"
type = "metric alert"