From 814ee2838da545e1fd75592038e4f7e7fe2dd4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Respaut?= Date: Tue, 31 Oct 2017 11:04:38 +0100 Subject: [PATCH] MON-76: Readme update with inputs --- cloud/azure/redis/README.md | 17 +++++++++++++++ cloud/azure/redis/inputs.tf | 26 +++++++++++++++-------- cloud/azure/redis/monitors-azure-redis.tf | 12 +++++++---- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/cloud/azure/redis/README.md b/cloud/azure/redis/README.md index b5acaaa..d885193 100644 --- a/cloud/azure/redis/README.md +++ b/cloud/azure/redis/README.md @@ -24,6 +24,23 @@ Creates a DataDog monitors with the following checks : * Processor time (percent) threshold * Server CPU load threshold +Inputs +------ + +| Name | Description | Type | Default | Required | +|------|-------------|:----:|:-----:|:-----:| +| client_name | Client name | string | - | yes | +| delay | Delay in seconds for the metric evaluation | string | `600` | no | +| environment | Architecture environment | string | - | yes | +| evictedkeys_limit_threshold_critical | Evicted keys limit (critical threshold) | string | `100` | no | +| evictedkeys_limit_threshold_warning | Evicted keys limit (warning threshold) | string | `0` | no | +| message | Message sent when a Redis monitor is triggered | string | - | yes | +| percent_processor_time_threshold_critical | Processor time percent (critical threshold) | string | `80` | no | +| percent_processor_time_threshold_warning | Processor time percent (warning threshold) | string | `60` | no | +| server_load_rate_threshold_critical | Server CPU load rate (critical threshold) | string | `90` | no | +| server_load_rate_threshold_warning | Server CPU load rate (warning threshold) | string | `70` | no | +| use_filter_tags | Filter the data with service tags if true | string | `true` | no | + Related documentation --------------------- diff --git a/cloud/azure/redis/inputs.tf b/cloud/azure/redis/inputs.tf index a96cc51..89385e8 100644 --- a/cloud/azure/redis/inputs.tf +++ b/cloud/azure/redis/inputs.tf @@ -1,10 +1,12 @@ # Global Terraform variable "client_name" { - type = "string" + description = "Client name" + type = "string" } variable "environment" { - type = "string" + description = "Architecture environment" + type = "string" } # Global DataDog @@ -14,7 +16,7 @@ variable "message" { variable "delay" { description = "Delay in seconds for the metric evaluation" - default = 600 + default = 600 } variable "use_filter_tags" { @@ -24,25 +26,31 @@ variable "use_filter_tags" { # Azure Redis specific variable "evictedkeys_limit_threshold_warning" { - default = 0 + description = "Evicted keys limit (warning threshold)" + default = 0 } variable "evictedkeys_limit_threshold_critical" { - default = 100 + description = "Evicted keys limit (critical threshold)" + default = 100 } variable "percent_processor_time_threshold_critical" { - default = 80 + description = "Processor time percent (critical threshold)" + default = 80 } variable "percent_processor_time_threshold_warning" { - default = 60 + description = "Processor time percent (warning threshold)" + default = 60 } variable "server_load_rate_threshold_critical" { - default = 90 + description = "Server CPU load rate (critical threshold)" + default = 90 } variable "server_load_rate_threshold_warning" { - default = 70 + description = "Server CPU load rate (warning threshold)" + default = 70 } diff --git a/cloud/azure/redis/monitors-azure-redis.tf b/cloud/azure/redis/monitors-azure-redis.tf index b3ad63a..8287dad 100644 --- a/cloud/azure/redis/monitors-azure-redis.tf +++ b/cloud/azure/redis/monitors-azure-redis.tf @@ -13,7 +13,8 @@ resource "datadog_monitor" "status" { query = < ${var.evictedkeys_limit_threshold_critical} EOF - type = "query alert" + + type = "query alert" thresholds { warning = "${var.evictedkeys_limit_threshold_warning}" @@ -64,7 +66,8 @@ resource "datadog_monitor" "percent_processor_time" { avg:azure.cache_redis.percent_processor_time{${data.template_file.filter.rendered}} by {name,resource_group} ) > ${var.percent_processor_time_threshold_critical} EOF - type = "query alert" + + type = "query alert" thresholds { warning = "${var.percent_processor_time_threshold_warning}" @@ -92,7 +95,8 @@ resource "datadog_monitor" "server_load" { avg:azure.cache_redis.server_load{${data.template_file.filter.rendered}} by {name,resource_group} ) > ${var.server_load_rate_threshold_critical} EOF - type = "query alert" + + type = "query alert" thresholds { warning = "${var.server_load_rate_threshold_warning}"