diff --git a/cloud/aws/elasticache/common/README.md b/cloud/aws/elasticache/common/README.md index 779e9c9..2d84f7e 100644 --- a/cloud/aws/elasticache/common/README.md +++ b/cloud/aws/elasticache/common/README.md @@ -1,78 +1,78 @@ -AWS ElastiCache Service DataDog monitors -======================================== - -How to use this module ----------------------- - -``` -module "datadog-monitors-aws-elasticache" { - source = "../common" - - message = "${module.datadog-message-alerting.alerting-message}" - environment = "${var.environment}" - filter_tags = "${var.filter_tags}" - resource = "${var.type_of_resource}" -} - -``` - -This module is loaded by default when you define `memcached` or `redis` monitors - -Purpose -------- -Creates DataDog monitors with the following checks: - -* Eviction -* Eviction growing -* Swap -* Max connections -* No connection -* Free Memory - -Inputs ------- - -| Name | Description | Type | Default | Required | -|------|-------------|:----:|:-----:|:-----:| -| delay | Delay in seconds for the metric evaluation | string | `900` | no | -| environment | Infrastructure Environment | string | - | yes | -| eviction_growing_condition_timeframe | Monitor condition timeframe for Elasticache eviction growing [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | -| eviction_growing_message | Custom message for Elasticache eviction growing monitor | string | `` | no | -| eviction_growing_silenced | Groups to mute for Elasticache eviction growing monitor | map | `` | no | -| eviction_growing_threshold_critical | Elasticache eviction growing critical threshold in percentage | string | `30` | no | -| eviction_growing_threshold_warning | Elasticache eviction growing warning threshold in percentage | string | `10` | no | -| eviction_growing_timeframe | Monitor timeframe for Elasticache eviction growing [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | -| eviction_message | Custom message for Elasticache eviction monitor | string | `` | no | -| eviction_silenced | Groups to mute for Elasticache eviction monitor | map | `` | no | -| eviction_time_aggregator | Monitor aggregator for Elasticache eviction [available values: min, max or avg] | string | `min` | no | -| eviction_timeframe | Monitor timeframe for Elasticache eviction [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | -| filter_tags | Tags used for filtering | string | - | yes | -| free_memory_condition_timeframe | Monitor condition timeframe for Elasticache free memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | -| free_memory_message | Custom message for Elasticache free memory monitor | string | `` | no | -| free_memory_silenced | Groups to mute for Elasticache free memory monitor | map | `` | no | -| free_memory_threshold_critical | Elasticache free memory critical threshold in percentage | string | `-70` | no | -| free_memory_threshold_warning | Elasticache free memory warning threshold in percentage | string | `-50` | no | -| free_memory_timeframe | Monitor timeframe for Elasticache free memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | -| max_connection_message | Custom message for Elasticache max connection monitor | string | `` | no | -| max_connection_silenced | Groups to mute for Elasticache max connection monitor | map | `` | no | -| max_connection_time_aggregator | Monitor aggregator for Elasticache max connection [available values: min, max or avg] | string | `max` | no | -| max_connection_timeframe | Monitor timeframe for Elasticache max connection [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 an alert is triggered | string | - | yes | -| no_connection_message | Custom message for Elasticache no connection monitor | string | `` | no | -| no_connection_silenced | Groups to mute for Elasticache no connection monitor | map | `` | no | -| no_connection_time_aggregator | Monitor aggregator for Elasticache no connection [available values: min, max or avg] | string | `min` | no | -| no_connection_timeframe | Monitor timeframe for Elasticache no connection [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | -| resource | Type of Elasticache used | string | - | yes | -| swap_message | Custom message for Elasticache swap monitor | string | `` | no | -| swap_silenced | Groups to mute for Elasticache swap monitor | map | `` | no | -| swap_threshold_critical | Elasticache swap critical threshold in percentage | string | `50000000` | no | -| swap_threshold_warning | Elasticache swap warning threshold in percentage | string | `0` | no | -| swap_time_aggregator | Monitor aggregator for Elasticache memcached swap [available values: min, max or avg] | string | `min` | no | -| swap_timeframe | Monitor timeframe for Elasticache swap [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | - -Related documentation ---------------------- - -DataDog documentation: [https://docs.datadoghq.com/integrations/amazon_elasticache/](https://docs.datadoghq.com/integrations/amazon_elasticache/) - -AWS ElasticSearch Service Instance metrics documentation: [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elasticache-metricscollected.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elasticache-metricscollected.html) +AWS ElastiCache Service DataDog monitors +======================================== + +How to use this module +---------------------- + +``` +module "datadog-monitors-aws-elasticache" { + source = "../common" + + message = "${module.datadog-message-alerting.alerting-message}" + environment = "${var.environment}" + filter_tags = "${var.filter_tags}" + resource = "${var.type_of_resource}" +} + +``` + +This module is loaded by default when you define `memcached` or `redis` monitors + +Purpose +------- +Creates DataDog monitors with the following checks: + +* Eviction +* Eviction growing +* Swap +* Max connections +* No connection +* Free Memory + +Related documentation +--------------------- + +DataDog documentation: [https://docs.datadoghq.com/integrations/amazon_elasticache/](https://docs.datadoghq.com/integrations/amazon_elasticache/) + +AWS ElasticSearch Service Instance metrics documentation: [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elasticache-metricscollected.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elasticache-metricscollected.html) + +Inputs +------ + +| Name | Description | Type | Default | Required | +|------|-------------|:----:|:-----:|:-----:| +| delay | Delay in seconds for the metric evaluation | string | - | yes | +| environment | Infrastructure Environment | string | - | yes | +| eviction_growing_condition_timeframe | Monitor condition timeframe for Elasticache eviction growing [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | - | yes | +| eviction_growing_message | Custom message for Elasticache eviction growing monitor | string | - | yes | +| eviction_growing_silenced | Groups to mute for Elasticache eviction growing monitor | map | - | yes | +| eviction_growing_threshold_critical | Elasticache eviction growing critical threshold in percentage | string | - | yes | +| eviction_growing_threshold_warning | Elasticache eviction growing warning threshold in percentage | string | - | yes | +| eviction_growing_timeframe | Monitor timeframe for Elasticache eviction growing [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | - | yes | +| eviction_message | Custom message for Elasticache eviction monitor | string | - | yes | +| eviction_silenced | Groups to mute for Elasticache eviction monitor | map | - | yes | +| eviction_time_aggregator | Monitor aggregator for Elasticache eviction [available values: min, max or avg] | string | - | yes | +| eviction_timeframe | Monitor timeframe for Elasticache eviction [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | - | yes | +| filter_tags | Tags used for filtering | string | - | yes | +| free_memory_condition_timeframe | Monitor condition timeframe for Elasticache free memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | - | yes | +| free_memory_message | Custom message for Elasticache free memory monitor | string | - | yes | +| free_memory_silenced | Groups to mute for Elasticache free memory monitor | map | - | yes | +| free_memory_threshold_critical | Elasticache free memory critical threshold in percentage | string | - | yes | +| free_memory_threshold_warning | Elasticache free memory warning threshold in percentage | string | - | yes | +| free_memory_timeframe | Monitor timeframe for Elasticache free memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | - | yes | +| max_connection_message | Custom message for Elasticache max connection monitor | string | - | yes | +| max_connection_silenced | Groups to mute for Elasticache max connection monitor | map | - | yes | +| max_connection_time_aggregator | Monitor aggregator for Elasticache max connection [available values: min, max or avg] | string | - | yes | +| max_connection_timeframe | Monitor timeframe for Elasticache max connection [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | - | yes | +| message | Message sent when an alert is triggered | string | - | yes | +| no_connection_message | Custom message for Elasticache no connection monitor | string | - | yes | +| no_connection_silenced | Groups to mute for Elasticache no connection monitor | map | - | yes | +| no_connection_time_aggregator | Monitor aggregator for Elasticache no connection [available values: min, max or avg] | string | - | yes | +| no_connection_timeframe | Monitor timeframe for Elasticache no connection [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | - | yes | +| resource | Type of Elasticache used | string | - | yes | +| swap_message | Custom message for Elasticache swap monitor | string | - | yes | +| swap_silenced | Groups to mute for Elasticache swap monitor | map | - | yes | +| swap_threshold_critical | Elasticache swap critical threshold in percentage | string | - | yes | +| swap_threshold_warning | Elasticache swap warning threshold in percentage | string | - | yes | +| swap_time_aggregator | Monitor aggregator for Elasticache memcached swap [available values: min, max or avg] | string | - | yes | +| swap_timeframe | Monitor timeframe for Elasticache swap [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | - | yes | diff --git a/cloud/aws/elasticache/common/inputs.tf b/cloud/aws/elasticache/common/inputs.tf index bda0bfd..6a686b2 100644 --- a/cloud/aws/elasticache/common/inputs.tf +++ b/cloud/aws/elasticache/common/inputs.tf @@ -7,7 +7,6 @@ variable "environment" { # Global DataDog variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 900 } variable "message" { @@ -26,165 +25,135 @@ variable "resource" { variable "eviction_silenced" { description = "Groups to mute for Elasticache eviction monitor" type = "map" - default = {} } variable "eviction_message" { description = "Custom message for Elasticache eviction monitor" type = "string" - default = "" } variable "eviction_time_aggregator" { description = "Monitor aggregator for Elasticache eviction [available values: min, max or avg]" type = "string" - default = "min" } variable "eviction_timeframe" { description = "Monitor timeframe for Elasticache eviction [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - default = "last_5m" } variable "max_connection_silenced" { description = "Groups to mute for Elasticache max connection monitor" type = "map" - default = {} } variable "max_connection_message" { description = "Custom message for Elasticache max connection monitor" type = "string" - default = "" } variable "max_connection_time_aggregator" { description = "Monitor aggregator for Elasticache max connection [available values: min, max or avg]" type = "string" - default = "max" } variable "max_connection_timeframe" { description = "Monitor timeframe for Elasticache max connection [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - default = "last_5m" } variable "no_connection_silenced" { description = "Groups to mute for Elasticache no connection monitor" type = "map" - default = {} } variable "no_connection_message" { description = "Custom message for Elasticache no connection monitor" type = "string" - default = "" } variable "no_connection_time_aggregator" { description = "Monitor aggregator for Elasticache no connection [available values: min, max or avg]" type = "string" - default = "min" } variable "no_connection_timeframe" { description = "Monitor timeframe for Elasticache no connection [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - default = "last_5m" } variable "swap_silenced" { description = "Groups to mute for Elasticache swap monitor" type = "map" - default = {} } variable "swap_message" { description = "Custom message for Elasticache swap monitor" type = "string" - default = "" } variable "swap_time_aggregator" { description = "Monitor aggregator for Elasticache memcached swap [available values: min, max or avg]" type = "string" - default = "min" } variable "swap_timeframe" { description = "Monitor timeframe for Elasticache swap [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - default = "last_5m" } variable "swap_threshold_warning" { description = "Elasticache swap warning threshold in percentage" - default = 0 } variable "swap_threshold_critical" { description = "Elasticache swap critical threshold in percentage" - default = 50000000 } variable "free_memory_silenced" { description = "Groups to mute for Elasticache free memory monitor" type = "map" - default = {} } variable "free_memory_message" { description = "Custom message for Elasticache free memory monitor" type = "string" - default = "" } variable "free_memory_condition_timeframe" { description = "Monitor condition timeframe for Elasticache free memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - default = "last_15m" } variable "free_memory_timeframe" { description = "Monitor timeframe for Elasticache free memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - default = "last_15m" } variable "free_memory_threshold_warning" { description = "Elasticache free memory warning threshold in percentage" - default = -50 } variable "free_memory_threshold_critical" { description = "Elasticache free memory critical threshold in percentage" - default = -70 } variable "eviction_growing_silenced" { description = "Groups to mute for Elasticache eviction growing monitor" type = "map" - default = {} } variable "eviction_growing_message" { description = "Custom message for Elasticache eviction growing monitor" type = "string" - default = "" } variable "eviction_growing_condition_timeframe" { description = "Monitor condition timeframe for Elasticache eviction growing [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - default = "last_5m" } variable "eviction_growing_timeframe" { description = "Monitor timeframe for Elasticache eviction growing [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" - default = "last_5m" } variable "eviction_growing_threshold_warning" { description = "Elasticache eviction growing warning threshold in percentage" - default = 10 } variable "eviction_growing_threshold_critical" { description = "Elasticache eviction growing critical threshold in percentage" - default = 30 } diff --git a/cloud/aws/elasticache/memcached/README.md b/cloud/aws/elasticache/memcached/README.md index 3b4f2fc..5b6bbec 100644 --- a/cloud/aws/elasticache/memcached/README.md +++ b/cloud/aws/elasticache/memcached/README.md @@ -32,6 +32,17 @@ Elasticache common: * No connection * Free Memory +Related documentation +--------------------- + +DataDog documentation: + +* [https://docs.datadoghq.com/integrations/amazon_elasticache/](https://docs.datadoghq.com/integrations/amazon_elasticache/) +* [https://www.datadoghq.com/blog/monitoring-elasticache-performance-metrics-with-redis-or-memcached/](https://www.datadoghq.com/blog/monitoring-elasticache-performance-metrics-with-redis-or-memcached/) + + +AWS ElasticSearch Service Instance metrics documentation: [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elasticache-metricscollected.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elasticache-metricscollected.html) + Inputs ------ @@ -84,16 +95,3 @@ Inputs | swap_threshold_warning | Elasticache swap warning threshold in Bytes | string | `40000000` | no | | swap_time_aggregator | Monitor aggregator for Elasticache memcached swap [available values: min, max or avg] | string | `min` | no | | swap_timeframe | Monitor timeframe for Elasticache swap [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | - -Related documentation ---------------------- - -DataDog documentation: - -* [https://docs.datadoghq.com/integrations/amazon_elasticache/](https://docs.datadoghq.com/integrations/amazon_elasticache/) -* [https://www.datadoghq.com/blog/monitoring-elasticache-performance-metrics-with-redis-or-memcached/](https://www.datadoghq.com/blog/monitoring-elasticache-performance-metrics-with-redis-or-memcached/) - - -AWS ElasticSearch Service Instance metrics documentation: [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elasticache-metricscollected.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elasticache-metricscollected.html) - - diff --git a/cloud/aws/elasticache/memcached/monitors-memcached.tf b/cloud/aws/elasticache/memcached/monitors-memcached.tf index 1ac0125..37d109b 100644 --- a/cloud/aws/elasticache/memcached/monitors-memcached.tf +++ b/cloud/aws/elasticache/memcached/monitors-memcached.tf @@ -14,6 +14,8 @@ module "datadog-monitors-aws-elasticache-common" { filter_tags = "${data.template_file.filter.rendered}" resource = "memcached" + delay = "${var.delay}" + eviction_message = "${var.eviction_message}" eviction_silenced = "${var.eviction_silenced}" eviction_time_aggregator = "${var.eviction_time_aggregator}" diff --git a/cloud/aws/elasticache/redis/README.md b/cloud/aws/elasticache/redis/README.md index e9a8b76..82d1f4c 100644 --- a/cloud/aws/elasticache/redis/README.md +++ b/cloud/aws/elasticache/redis/README.md @@ -34,6 +34,18 @@ Elasticache common: * No connection * Free Memory +Related documentation +--------------------- + +DataDog documentation: + +* [https://docs.datadoghq.com/integrations/amazon_elasticache/](https://docs.datadoghq.com/integrations/amazon_elasticache/) +* [https://www.datadoghq.com/dashboards/elasticache-dashboard-redis/](https://www.datadoghq.com/dashboards/elasticache-dashboard-redis/) +* [https://www.datadoghq.com/blog/monitoring-elasticache-performance-metrics-with-redis-or-memcached/](https://www.datadoghq.com/blog/monitoring-elasticache-performance-metrics-with-redis-or-memcached/) + +AWS ElasticSearch Service Instance metrics documentation: [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elasticache-metricscollected.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elasticache-metricscollected.html) + + Inputs ------ @@ -94,18 +106,3 @@ Inputs | swap_threshold_warning | Elasticache swap warning threshold in Bytes | string | `40000000` | no | | swap_time_aggregator | Monitor aggregator for Elasticache memcached swap [available values: min, max or avg] | string | `min` | no | | swap_timeframe | Monitor timeframe for Elasticache swap [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | - - -Related documentation ---------------------- - -DataDog documentation: - -* [https://docs.datadoghq.com/integrations/amazon_elasticache/](https://docs.datadoghq.com/integrations/amazon_elasticache/) -* [https://www.datadoghq.com/dashboards/elasticache-dashboard-redis/](https://www.datadoghq.com/dashboards/elasticache-dashboard-redis/) -* [https://www.datadoghq.com/blog/monitoring-elasticache-performance-metrics-with-redis-or-memcached/](https://www.datadoghq.com/blog/monitoring-elasticache-performance-metrics-with-redis-or-memcached/) - -AWS ElasticSearch Service Instance metrics documentation: [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elasticache-metricscollected.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/elasticache-metricscollected.html) - - - diff --git a/cloud/aws/elasticache/redis/monitors-redis.tf b/cloud/aws/elasticache/redis/monitors-redis.tf index add9ec4..08f35ef 100644 --- a/cloud/aws/elasticache/redis/monitors-redis.tf +++ b/cloud/aws/elasticache/redis/monitors-redis.tf @@ -14,6 +14,8 @@ module "datadog-monitors-aws-elasticache-common" { filter_tags = "${data.template_file.filter.rendered}" resource = "redis" + delay = "${var.delay}" + eviction_message = "${var.eviction_message}" eviction_silenced = "${var.eviction_silenced}" eviction_time_aggregator = "${var.eviction_time_aggregator}"