From 966a9b5f540e0f1ec843305060303c002b56e524 Mon Sep 17 00:00:00 2001 From: Alexandre Gaillet Date: Fri, 27 Apr 2018 17:04:47 +0200 Subject: [PATCH] MON-191 - AWS monitors updated with customizable aggregator --- cloud/aws/alb/README.md | 6 ++++ cloud/aws/alb/inputs.tf | 36 +++++++++++++++++++ cloud/aws/alb/monitors-alb.tf | 32 ++++++++--------- cloud/aws/apigateway/README.md | 4 ++- cloud/aws/apigateway/inputs.tf | 18 ++++++++++ cloud/aws/apigateway/monitors-api.tf | 16 ++++----- cloud/aws/elasticsearch/README.md | 3 ++ cloud/aws/elasticsearch/inputs.tf | 18 ++++++++++ .../elasticsearch/monitors-elasticsearch.tf | 14 ++++---- cloud/aws/elb/README.md | 6 ++++ cloud/aws/elb/inputs.tf | 36 +++++++++++++++++++ cloud/aws/elb/monitors-elb.tf | 32 ++++++++--------- cloud/aws/kinesis-firehose/README.md | 2 ++ cloud/aws/kinesis-firehose/inputs.tf | 6 ++++ .../monitors-kinesis-firehose.tf | 4 +-- cloud/aws/rds/README.md | 2 ++ cloud/aws/rds/inputs.tf | 12 +++++++ cloud/aws/rds/monitors-rds.tf | 10 +++--- cloud/aws/vpn/README.md | 1 + cloud/aws/vpn/inputs.tf | 6 ++++ cloud/aws/vpn/monitors-vpn.tf | 4 +-- 21 files changed, 211 insertions(+), 57 deletions(-) diff --git a/cloud/aws/alb/README.md b/cloud/aws/alb/README.md index 027e1fd..64d78db 100644 --- a/cloud/aws/alb/README.md +++ b/cloud/aws/alb/README.md @@ -30,6 +30,7 @@ Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| alb_no_healthy_instances_aggregator | Monitor aggregator for ALB no healthy instances [available values: min, max, sum or avg] | string | `min` | no | | alb_no_healthy_instances_message | Custom message for ALB no healthy instances monitor | string | `` | no | | alb_no_healthy_instances_silenced | Groups to mute for ALB no healthy instances monitor | map | `` | no | | alb_no_healthy_instances_timeframe | Monitor timeframe for ALB no healthy instances [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_1m` | no | @@ -38,26 +39,31 @@ Inputs | environment | Architecture environment | string | - | yes | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | +| httpcode_elb_4xx_aggregator | Monitor aggregator for ALB httpcode 4xx [available values: min, max, sum or avg] | string | `min` | no | | httpcode_elb_4xx_message | Custom message for ALB httpcode 4xx monitor | string | `` | no | | httpcode_elb_4xx_silenced | Groups to mute for ALB httpcode 4xx monitor | map | `` | no | | httpcode_elb_4xx_threshold_critical | loadbalancer 4xx critical threshold in percentage | string | `80` | no | | httpcode_elb_4xx_threshold_warning | loadbalancer 4xx warning threshold in percentage | string | `60` | no | | httpcode_elb_4xx_timeframe | Monitor timeframe for ALB httpcode 4xx [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| httpcode_elb_5xx_aggregator | Monitor aggregator for ALB httpcode 5xx [available values: min, max, sum or avg] | string | `min` | no | | httpcode_elb_5xx_message | Custom message for ALB httpcode 5xx monitor | string | `` | no | | httpcode_elb_5xx_silenced | Groups to mute for ALB httpcode 5xx monitor | map | `` | no | | httpcode_elb_5xx_threshold_critical | loadbalancer 5xxcritical threshold in percentage | string | `80` | no | | httpcode_elb_5xx_threshold_warning | loadbalancer 5xx warning threshold in percentage | string | `60` | no | | httpcode_elb_5xx_timeframe | Monitor timeframe for ALB httpcode 5xx [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| httpcode_target_4xx_aggregator | Monitor aggregator for ALB target httpcode 4xx [available values: min, max, sum or avg] | string | `min` | no | | httpcode_target_4xx_message | Custom message for ALB target httpcode 4xx monitor | string | `` | no | | httpcode_target_4xx_silenced | Groups to mute for ALB target httpcode 4xx monitor | map | `` | no | | httpcode_target_4xx_threshold_critical | target 4xx critical threshold in percentage | string | `80` | no | | httpcode_target_4xx_threshold_warning | target 4xx warning threshold in percentage | string | `60` | no | | httpcode_target_4xx_timeframe | Monitor timeframe for ALB target httpcode 4xx [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| httpcode_target_5xx_aggregator | Monitor aggregator for ALB target httpcode 5xx [available values: min, max, sum or avg] | string | `min` | no | | httpcode_target_5xx_message | Custom message for ALB target httpcode 5xx monitor | string | `` | no | | httpcode_target_5xx_silenced | Groups to mute for ALB target httpcode 5xx monitor | map | `` | no | | httpcode_target_5xx_threshold_critical | target 5xx critical threshold in percentage | string | `80` | no | | httpcode_target_5xx_threshold_warning | target 5xx warning threshold in percentage | string | `60` | no | | httpcode_target_5xx_timeframe | Monitor timeframe for ALB target httpcode 5xx [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| latency_aggregator | Monitor aggregator for ALB latency [available values: min, max, sum or avg] | string | `min` | no | | latency_message | Custom message for ALB latency monitor | string | `` | no | | latency_silenced | Groups to mute for ALB latency monitor | map | `` | no | | latency_threshold_critical | latency critical threshold in milliseconds | string | `1000` | no | diff --git a/cloud/aws/alb/inputs.tf b/cloud/aws/alb/inputs.tf index 585740e..68a057a 100644 --- a/cloud/aws/alb/inputs.tf +++ b/cloud/aws/alb/inputs.tf @@ -38,6 +38,12 @@ variable "alb_no_healthy_instances_message" { default = "" } +variable "alb_no_healthy_instances_aggregator" { + description = "Monitor aggregator for ALB no healthy instances [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "alb_no_healthy_instances_timeframe" { description = "Monitor timeframe for ALB no healthy instances [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -56,6 +62,12 @@ variable "latency_message" { default = "" } +variable "latency_aggregator" { + description = "Monitor aggregator for ALB latency [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "latency_timeframe" { description = "Monitor timeframe for ALB latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -84,6 +96,12 @@ variable "httpcode_elb_4xx_message" { default = "" } +variable "httpcode_elb_4xx_aggregator" { + description = "Monitor aggregator for ALB httpcode 4xx [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "httpcode_elb_4xx_timeframe" { description = "Monitor timeframe for ALB httpcode 4xx [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -112,6 +130,12 @@ variable "httpcode_target_4xx_message" { default = "" } +variable "httpcode_target_4xx_aggregator" { + description = "Monitor aggregator for ALB target httpcode 4xx [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "httpcode_target_4xx_timeframe" { description = "Monitor timeframe for ALB target httpcode 4xx [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -140,6 +164,12 @@ variable "httpcode_elb_5xx_message" { default = "" } +variable "httpcode_elb_5xx_aggregator" { + description = "Monitor aggregator for ALB httpcode 5xx [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "httpcode_elb_5xx_timeframe" { description = "Monitor timeframe for ALB httpcode 5xx [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -168,6 +198,12 @@ variable "httpcode_target_5xx_message" { default = "" } +variable "httpcode_target_5xx_aggregator" { + description = "Monitor aggregator for ALB target httpcode 5xx [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "httpcode_target_5xx_timeframe" { description = "Monitor timeframe for ALB target httpcode 5xx [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" diff --git a/cloud/aws/alb/monitors-alb.tf b/cloud/aws/alb/monitors-alb.tf index 51d2d5b..e9272b2 100644 --- a/cloud/aws/alb/monitors-alb.tf +++ b/cloud/aws/alb/monitors-alb.tf @@ -14,8 +14,8 @@ resource "datadog_monitor" "ALB_no_healthy_instances" { message = "${coalesce(var.alb_no_healthy_instances_message, var.message)}" query = < ${var.latency_threshold_critical} EOF @@ -73,10 +73,10 @@ resource "datadog_monitor" "ALB_httpcode_elb_5xx" { message = "${coalesce(var.httpcode_elb_5xx_message, var.message)}" query = < ${var.httpcode_elb_5xx_threshold_critical} EOF @@ -106,10 +106,10 @@ resource "datadog_monitor" "ALB_httpcode_elb_4xx" { message = "${coalesce(var.httpcode_elb_4xx_message, var.message)}" query = < ${var.httpcode_elb_4xx_threshold_critical} EOF @@ -139,10 +139,10 @@ resource "datadog_monitor" "ALB_httpcode_target_5xx" { message = "${coalesce(var.httpcode_target_5xx_message, var.message)}" query = < ${var.httpcode_target_5xx_threshold_critical} EOF @@ -172,10 +172,10 @@ resource "datadog_monitor" "ALB_httpcode_target_4xx" { message = "${coalesce(var.httpcode_target_4xx_message, var.message)}" query = < ${var.httpcode_target_4xx_threshold_critical} EOF diff --git a/cloud/aws/apigateway/README.md b/cloud/aws/apigateway/README.md index 755cfce..9ec15b9 100644 --- a/cloud/aws/apigateway/README.md +++ b/cloud/aws/apigateway/README.md @@ -31,23 +31,25 @@ Inputs | delay | Delay in seconds for the metric evaluation | string | `900` | no | | environment | Environment | string | - | yes | | filter_tags | Tags used for filtering | string | `*` | no | +| http_4xx_requests_aggregator | Monitor aggregator for API Gateway HTTP 4xx requests [available values: min, max, sum or avg] | string | `min` | no | | http_4xx_requests_message | Custom message for API Gateway HTTP 4xx requests monitor | string | `` | no | | http_4xx_requests_silenced | Groups to mute for API Gateway HTTP 4xx requests monitor | map | `` | no | | http_4xx_requests_threshold_critical | Maximum critical acceptable percent of 4xx errors | string | `30` | no | | http_4xx_requests_threshold_warning | Maximum warning acceptable percent of 4xx errors | string | `15` | no | | http_4xx_requests_timeframe | Monitor timeframe for API HTTP 4xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| http_5xx_requests_aggregator | Monitor aggregator for API Gateway HTTP 5xx requests [available values: min, max, sum or avg] | string | `min` | no | | http_5xx_requests_message | Custom message for API Gateway HTTP 5xx requests monitor | string | `` | no | | http_5xx_requests_silenced | Groups to mute for API Gateway HTTP 5xx requests monitor | map | `` | no | | http_5xx_requests_threshold_critical | Maximum critical acceptable percent of 5xx errors | string | `20` | no | | http_5xx_requests_threshold_warning | Maximum warning acceptable percent of 5xx errors | string | `10` | no | | http_5xx_requests_timeframe | Monitor timeframe for API HTTP 5xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| latency_aggregator | Monitor aggregator for API Gateway latency [available values: min, max, sum or avg] | string | `min` | no | | latency_message | Custom message for API Gateway latency monitor | string | `` | no | | latency_silenced | Groups to mute for API Gateway latency monitor | map | `` | no | | latency_threshold_critical | Alerting threshold in milliseconds | string | `800` | no | | latency_threshold_warning | Warning threshold in milliseconds | string | `400` | no | | latency_timeframe | Monitor timeframe for API latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | message | Message sent when a monitor is triggered | string | - | yes | - Related documentation --------------------- diff --git a/cloud/aws/apigateway/inputs.tf b/cloud/aws/apigateway/inputs.tf index 83acd7c..21598f8 100644 --- a/cloud/aws/apigateway/inputs.tf +++ b/cloud/aws/apigateway/inputs.tf @@ -33,6 +33,12 @@ variable "latency_message" { default = "" } +variable "latency_aggregator" { + description = "Monitor aggregator for API Gateway latency [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "latency_timeframe" { description = "Monitor timeframe for API latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -65,6 +71,12 @@ variable "http_5xx_requests_message" { default = "" } +variable "http_5xx_requests_aggregator" { + description = "Monitor aggregator for API Gateway HTTP 5xx requests [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "http_5xx_requests_timeframe" { description = "Monitor timeframe for API HTTP 5xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -97,6 +109,12 @@ variable "http_4xx_requests_message" { default = "" } +variable "http_4xx_requests_aggregator" { + description = "Monitor aggregator for API Gateway HTTP 4xx requests [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "http_4xx_requests_timeframe" { description = "Monitor timeframe for API HTTP 4xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" diff --git a/cloud/aws/apigateway/monitors-api.tf b/cloud/aws/apigateway/monitors-api.tf index 8fd52a7..602fdfd 100644 --- a/cloud/aws/apigateway/monitors-api.tf +++ b/cloud/aws/apigateway/monitors-api.tf @@ -5,8 +5,8 @@ resource "datadog_monitor" "API_Gateway_latency" { message = "${coalesce(var.latency_message, var.message)}" query = < ${var.latency_threshold_critical} EOF @@ -36,10 +36,10 @@ resource "datadog_monitor" "API_http_5xx_errors_count" { message = "${coalesce(var.http_5xx_requests_message, var.message)}" query = < ${var.http_5xx_requests_threshold_critical} EOF @@ -70,10 +70,10 @@ resource "datadog_monitor" "API_http_4xx_errors_count" { message = "${coalesce(var.http_4xx_requests_message, var.message)}" query = < ${var.http_4xx_requests_threshold_critical} EOF diff --git a/cloud/aws/elasticsearch/README.md b/cloud/aws/elasticsearch/README.md index 0d57cbd..65015e6 100644 --- a/cloud/aws/elasticsearch/README.md +++ b/cloud/aws/elasticsearch/README.md @@ -29,18 +29,21 @@ Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| cpu_aggregator | Monitor aggregator for ES cluster cpu [available values: min, max, sum or avg] | string | `avg` | no | | cpu_message | Custom message for ES cluster cpu monitor | string | `` | no | | cpu_silenced | Groups to mute for ES cluster cpu monitor | map | `` | no | | cpu_threshold_critical | CPU usage in percent (critical threshold) | string | `90` | no | | cpu_threshold_warning | CPU usage in percent (warning threshold) | string | `80` | no | | cpu_timeframe | Monitor timeframe for ES cluster cpu [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | | delay | Delay in seconds for the metric evaluation | string | `900` | no | +| diskspace_aggregator | Monitor aggregator for ES cluster diskspace [available values: min, max, sum or avg] | string | `avg` | no | | diskspace_message | Custom message for ES cluster diskspace monitor | string | `` | no | | diskspace_silenced | Groups to mute for ES cluster diskspace monitor | map | `` | no | | diskspace_threshold_critical | Disk free space in percent (critical threshold) | string | `10` | no | | diskspace_threshold_warning | Disk free space in percent (warning threshold) | string | `20` | no | | diskspace_timeframe | Monitor timeframe for ES cluster diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | | environment | Architecture Environment | string | - | yes | +| es_cluster_status_aggregator | Monitor aggregator for ES cluster status [available values: min, max, sum or avg] | string | `max` | no | | es_cluster_status_message | Custom message for ES cluster status monitor | string | `` | no | | es_cluster_status_silenced | Groups to mute for ES cluster status monitor | map | `` | no | | es_cluster_status_timeframe | Monitor timeframe for ES cluster status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_30m` | no | diff --git a/cloud/aws/elasticsearch/inputs.tf b/cloud/aws/elasticsearch/inputs.tf index 4d3fb2c..ee010a1 100644 --- a/cloud/aws/elasticsearch/inputs.tf +++ b/cloud/aws/elasticsearch/inputs.tf @@ -38,6 +38,12 @@ variable "es_cluster_status_message" { default = "" } +variable "es_cluster_status_aggregator" { + description = "Monitor aggregator for ES cluster status [available values: min, max, sum or avg]" + type = "string" + default = "max" +} + variable "es_cluster_status_timeframe" { description = "Monitor timeframe for ES cluster status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -60,6 +66,12 @@ variable "diskspace_message" { default = "" } +variable "diskspace_aggregator" { + description = "Monitor aggregator for ES cluster diskspace [available values: min, max, sum or avg]" + type = "string" + default = "avg" +} + variable "diskspace_timeframe" { description = "Monitor timeframe for ES cluster diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -88,6 +100,12 @@ variable "cpu_message" { default = "" } +variable "cpu_aggregator" { + description = "Monitor aggregator for ES cluster cpu [available values: min, max, sum or avg]" + type = "string" + default = "avg" +} + variable "cpu_timeframe" { description = "Monitor timeframe for ES cluster cpu [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" diff --git a/cloud/aws/elasticsearch/monitors-elasticsearch.tf b/cloud/aws/elasticsearch/monitors-elasticsearch.tf index 47dc1e2..309e0a7 100644 --- a/cloud/aws/elasticsearch/monitors-elasticsearch.tf +++ b/cloud/aws/elasticsearch/monitors-elasticsearch.tf @@ -18,9 +18,9 @@ resource "datadog_monitor" "es_cluster_status" { type = "metric alert" query = <= 2 EOF @@ -52,8 +52,8 @@ resource "datadog_monitor" "es_free_space_low" { type = "metric alert" query = < ${var.cpu_threshold_critical} EOF diff --git a/cloud/aws/elb/README.md b/cloud/aws/elb/README.md index ec188f8..0dbc061 100644 --- a/cloud/aws/elb/README.md +++ b/cloud/aws/elb/README.md @@ -32,31 +32,37 @@ Inputs |------|-------------|:----:|:-----:|:-----:| | artificial_requests_count | Number of false requests used to mitigate false positive in case of low trafic | string | `5` | no | | delay | Delay in seconds for the metric evaluation | string | `900` | no | +| elb_4xx_aggregator | Monitor aggregator for ELB 4xx errors [available values: min, max, sum or avg] | string | `min` | no | | elb_4xx_message | Custom message for ELB 4xx errors monitor | string | `` | no | | elb_4xx_silenced | Groups to mute for ELB 4xx errors monitor | map | `` | no | | elb_4xx_threshold_critical | loadbalancer 4xx critical threshold in percentage | string | `10` | no | | elb_4xx_threshold_warning | loadbalancer 4xx warning threshold in percentage | string | `5` | no | | elb_4xx_timeframe | Monitor timeframe for ELB 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| elb_5xx_aggregator | Monitor aggregator for ELB 5xx errors [available values: min, max, sum or avg] | string | `min` | no | | elb_5xx_message | Custom message for ELB 5xx errors monitor | string | `` | no | | elb_5xx_silenced | Groups to mute for ELB 5xx errors monitor | map | `` | no | | elb_5xx_threshold_critical | loadbalancer 5xx critical threshold in percentage | string | `10` | no | | elb_5xx_threshold_warning | loadbalancer 5xx warning threshold in percentage | string | `5` | no | | elb_5xx_timeframe | Monitor timeframe for ELB 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| elb_backend_4xx_aggregator | Monitor aggregator for ELB backend 4xx errors [available values: min, max, sum or avg] | string | `min` | no | | elb_backend_4xx_message | Custom message for ELB backend 4xx errors monitor | string | `` | no | | elb_backend_4xx_silenced | Groups to mute for ELB backend 4xx errors monitor | map | `` | no | | elb_backend_4xx_threshold_critical | loadbalancer backend 4xx critical threshold in percentage | string | `10` | no | | elb_backend_4xx_threshold_warning | loadbalancer backend 4xx warning threshold in percentage | string | `5` | no | | elb_backend_4xx_timeframe | Monitor timeframe for ELB backend 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| elb_backend_5xx_aggregator | Monitor aggregator for ELB backend 5xx errors [available values: min, max, sum or avg] | string | `min` | no | | elb_backend_5xx_message | Custom message for ELB backend 5xx errors monitor | string | `` | no | | elb_backend_5xx_silenced | Groups to mute for ELB backend 5xx errors monitor | map | `` | no | | elb_backend_5xx_threshold_critical | loadbalancer backend 5xx critical threshold in percentage | string | `10` | no | | elb_backend_5xx_threshold_warning | loadbalancer backend 5xx warning threshold in percentage | string | `5` | no | | elb_backend_5xx_timeframe | Monitor timeframe for ELB backend 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| elb_backend_latency_aggregator | Monitor aggregator for ELB backend latency [available values: min, max, sum or avg] | string | `min` | no | | elb_backend_latency_critical | latency critical threshold in seconds | string | `5` | no | | elb_backend_latency_message | Custom message for ELB backend latency monitor | string | `` | no | | elb_backend_latency_silenced | Groups to mute for ELB backend latency monitor | map | `` | no | | elb_backend_latency_timeframe | Monitor timeframe for ELB backend latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | elb_backend_latency_warning | latency warning threshold in seconds | string | `1` | no | +| elb_no_healthy_instance_aggregator | Monitor aggregator for ELB no healty instance [available values: min, max, sum or avg] | string | `min` | no | | elb_no_healthy_instance_message | Custom message for ELB no healty instance monitor | string | `` | no | | elb_no_healthy_instance_silenced | Groups to mute for ELB no healty instance monitor | map | `` | no | | elb_no_healthy_instance_timeframe | Monitor timeframe for ELB no healty instance [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | diff --git a/cloud/aws/elb/inputs.tf b/cloud/aws/elb/inputs.tf index 4809da0..53dc1fe 100644 --- a/cloud/aws/elb/inputs.tf +++ b/cloud/aws/elb/inputs.tf @@ -37,6 +37,12 @@ variable "elb_no_healthy_instance_message" { default = "" } +variable "elb_no_healthy_instance_aggregator" { + description = "Monitor aggregator for ELB no healty instance [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "elb_no_healthy_instance_timeframe" { description = "Monitor timeframe for ELB no healty instance [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -55,6 +61,12 @@ variable "elb_4xx_message" { default = "" } +variable "elb_4xx_aggregator" { + description = "Monitor aggregator for ELB 4xx errors [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "elb_4xx_timeframe" { description = "Monitor timeframe for ELB 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -83,6 +95,12 @@ variable "elb_5xx_message" { default = "" } +variable "elb_5xx_aggregator" { + description = "Monitor aggregator for ELB 5xx errors [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "elb_5xx_timeframe" { description = "Monitor timeframe for ELB 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -111,6 +129,12 @@ variable "elb_backend_4xx_message" { default = "" } +variable "elb_backend_4xx_aggregator" { + description = "Monitor aggregator for ELB backend 4xx errors [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "elb_backend_4xx_timeframe" { description = "Monitor timeframe for ELB backend 4xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -139,6 +163,12 @@ variable "elb_backend_5xx_message" { default = "" } +variable "elb_backend_5xx_aggregator" { + description = "Monitor aggregator for ELB backend 5xx errors [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "elb_backend_5xx_timeframe" { description = "Monitor timeframe for ELB backend 5xx errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -167,6 +197,12 @@ variable "elb_backend_latency_message" { default = "" } +variable "elb_backend_latency_aggregator" { + description = "Monitor aggregator for ELB backend latency [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + variable "elb_backend_latency_timeframe" { description = "Monitor timeframe for ELB backend latency [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" diff --git a/cloud/aws/elb/monitors-elb.tf b/cloud/aws/elb/monitors-elb.tf index a36f403..1390137 100644 --- a/cloud/aws/elb/monitors-elb.tf +++ b/cloud/aws/elb/monitors-elb.tf @@ -11,8 +11,8 @@ resource "datadog_monitor" "ELB_no_healthy_instances" { message = "${coalesce(var.elb_no_healthy_instance_message, var.message)}" query = < ${var.elb_4xx_threshold_critical} EOF @@ -73,10 +73,10 @@ resource "datadog_monitor" "ELB_too_much_5xx" { message = "${coalesce(var.elb_5xx_message, var.message)}" query = < ${var.elb_5xx_threshold_critical} EOF @@ -108,10 +108,10 @@ resource "datadog_monitor" "ELB_too_much_4xx_backend" { message = "${coalesce(var.elb_backend_4xx_message, var.message)}" query = < ${var.elb_backend_4xx_threshold_critical} EOF @@ -143,10 +143,10 @@ resource "datadog_monitor" "ELB_too_much_5xx_backend" { message = "${coalesce(var.elb_backend_5xx_message, var.message)}" query = < ${var.elb_backend_5xx_threshold_critical} EOF @@ -178,8 +178,8 @@ resource "datadog_monitor" "ELB_backend_latency" { message = "${coalesce(var.elb_backend_latency_message, var.message)}" query = < ${var.elb_backend_latency_critical} EOF diff --git a/cloud/aws/kinesis-firehose/README.md b/cloud/aws/kinesis-firehose/README.md index f4bffe6..21d4214 100644 --- a/cloud/aws/kinesis-firehose/README.md +++ b/cloud/aws/kinesis-firehose/README.md @@ -22,12 +22,14 @@ Creates DataDog monitors with the following checks : Inputs ------ + | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| | delay | Delay in seconds for the metric evaluation | string | `900` | no | | environment | Environment | string | - | yes | | filter_tags_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `*` | no | | filter_tags_use_defaults | Use default filter tags convention | string | `true` | no | +| incoming_records_aggregator | Monitor aggregator for Kinesis Firehorse incoming records [available values: min, max, sum or avg] | string | `sum` | no | | incoming_records_message | Custom message for Kinesis Firehorse incoming records monitor | string | `` | no | | incoming_records_silenced | Groups to mute for Kinesis Firehorse incoming records monitor | map | `` | no | | incoming_records_timeframe | Monitor timeframe for incoming records metrics evaluation [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | diff --git a/cloud/aws/kinesis-firehose/inputs.tf b/cloud/aws/kinesis-firehose/inputs.tf index 831045e..931b253 100644 --- a/cloud/aws/kinesis-firehose/inputs.tf +++ b/cloud/aws/kinesis-firehose/inputs.tf @@ -38,6 +38,12 @@ variable "incoming_records_message" { default = "" } +variable "incoming_records_aggregator" { + description = "Monitor aggregator for Kinesis Firehorse incoming records [available values: min, max, sum or avg]" + type = "string" + default = "sum" +} + variable "incoming_records_timeframe" { description = "Monitor timeframe for incoming records metrics evaluation [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" default = "last_15m" diff --git a/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf b/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf index 1f1a71b..d5ab13f 100644 --- a/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf +++ b/cloud/aws/kinesis-firehose/monitors-kinesis-firehose.tf @@ -14,8 +14,8 @@ resource "datadog_monitor" "firehose_incoming_records" { type = "metric alert" query = <` | no | | cpu_threshold_critical | CPU usage in percent (critical threshold) | string | `90` | no | | cpu_threshold_warning | CPU usage in percent (warning threshold) | string | `80` | no | | cpu_timeframe | Monitor timeframe for RDS CPU usage [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | | delay | Delay in seconds for the metric evaluation | string | `900` | no | +| diskspace_aggregator | Monitor aggregator for RDS free diskspace [available values: min, max, sum or avg] | string | `avg` | no | | diskspace_message | Custom message for RDS free diskspace monitor | string | `` | no | | diskspace_silenced | Groups to mute for RDS free diskspace monitor | map | `` | no | | diskspace_threshold_critical | Disk free space in percent (critical threshold) | string | `10` | no | diff --git a/cloud/aws/rds/inputs.tf b/cloud/aws/rds/inputs.tf index 37be0e2..e54b16d 100644 --- a/cloud/aws/rds/inputs.tf +++ b/cloud/aws/rds/inputs.tf @@ -38,6 +38,12 @@ variable "cpu_message" { default = "" } +variable "cpu_aggregator" { + description = "Monitor aggregator for RDS CPU usage [available values: min, max, sum or avg]" + type = "string" + default = "avg" +} + variable "cpu_timeframe" { description = "Monitor timeframe for RDS CPU usage [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" @@ -66,6 +72,12 @@ variable "diskspace_message" { default = "" } +variable "diskspace_aggregator" { + description = "Monitor aggregator for RDS free diskspace [available values: min, max, sum or avg]" + type = "string" + default = "avg" +} + variable "diskspace_timeframe" { description = "Monitor timeframe for RDS free diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" diff --git a/cloud/aws/rds/monitors-rds.tf b/cloud/aws/rds/monitors-rds.tf index 2717d1d..6c452be 100644 --- a/cloud/aws/rds/monitors-rds.tf +++ b/cloud/aws/rds/monitors-rds.tf @@ -14,8 +14,8 @@ resource "datadog_monitor" "rds_cpu_90_15min" { type = "metric alert" query = < ${var.cpu_threshold_critical} EOF @@ -46,9 +46,9 @@ resource "datadog_monitor" "rds_free_space_low" { type = "metric alert" query = <` | no | | vpn_status_timeframe | Monitor timeframe for VPN status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | diff --git a/cloud/aws/vpn/inputs.tf b/cloud/aws/vpn/inputs.tf index 13314b6..a95f500 100644 --- a/cloud/aws/vpn/inputs.tf +++ b/cloud/aws/vpn/inputs.tf @@ -36,6 +36,12 @@ variable "vpn_status_message" { default = "" } +variable "vpn_status_aggregator" { + description = "Monitor aggregator for VPN status [available values: min, max, sum or avg]" + type = "string" + default = "avg" +} + variable "vpn_status_timeframe" { description = "Monitor timeframe for VPN status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" diff --git a/cloud/aws/vpn/monitors-vpn.tf b/cloud/aws/vpn/monitors-vpn.tf index 1f94ebf..63c2a89 100644 --- a/cloud/aws/vpn/monitors-vpn.tf +++ b/cloud/aws/vpn/monitors-vpn.tf @@ -11,8 +11,8 @@ resource "datadog_monitor" "VPN_status" { message = "${coalesce(var.vpn_status_message, var.message)}" query = <