From e78c665813de25b9bd81ea7c385398edfff442a5 Mon Sep 17 00:00:00 2001 From: Alexandre Gaillet Date: Thu, 12 Jul 2018 16:08:11 +0200 Subject: [PATCH 1/6] MON-246 - Azure Databases for MySQL servers monitors added --- cloud/azure/mysql/README.md | 72 +++++++++++ cloud/azure/mysql/inputs.tf | 186 ++++++++++++++++++++++++++++ cloud/azure/mysql/monitors-mysql.tf | 162 ++++++++++++++++++++++++ 3 files changed, 420 insertions(+) create mode 100644 cloud/azure/mysql/README.md create mode 100644 cloud/azure/mysql/inputs.tf create mode 100644 cloud/azure/mysql/monitors-mysql.tf diff --git a/cloud/azure/mysql/README.md b/cloud/azure/mysql/README.md new file mode 100644 index 0000000..57cea90 --- /dev/null +++ b/cloud/azure/mysql/README.md @@ -0,0 +1,72 @@ +Azure Database for MySQL servers DataDog monitors +================================================= + +How to use this module +---------------------- + +``` +module "datadog-monitors-azure-mysql" { + source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//cloud/azure/mysql?ref={revision}" + + message = "${module.datadog-message-alerting.alerting-message}" + environment = "${var.environment}" +} +``` + +Purpose +------- +Creates a DataDog monitors with the following checks : + +* CPU Usage +* Memory Usage +* Free disk space +* No active connection +* IO consumption + +Inputs +------ + +| Name | Description | Type | Default | Required | +|------|-------------|:----:|:-----:|:-----:| +| cpu_usage_message | Custom message for Mysql CPU monitor | string | `` | no | +| cpu_usage_silenced | Groups to mute for Mysql CPU monitor | map | `` | no | +| cpu_usage_threshold_critical | Mysql CPU usage in percent (critical threshold) | string | `90` | no | +| cpu_usage_threshold_warning | Mysql CPU usage in percent (warning threshold) | string | `80` | no | +| cpu_usage_time_aggregator | Monitor aggregator for Mysql CPU [available values: min, max or avg] | string | `min` | no | +| cpu_usage_timeframe | Monitor timeframe for Mysql 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 | +| 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 | +| free_storage_message | Custom message for Mysql Free Storage monitor | string | `` | no | +| free_storage_silenced | Groups to mute for Mysql Free Storage monitor | map | `` | no | +| free_storage_threshold_critical | Mysql Free Storage remaining in percent (critical threshold) | string | `10` | no | +| free_storage_threshold_warning | Mysql Free Storage remaining in percent (warning threshold) | string | `20` | no | +| free_storage_time_aggregator | Monitor aggregator for Mysql Free Storage [available values: min, max or avg] | string | `min` | no | +| free_storage_timeframe | Monitor timeframe for Mysql Free Storage [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | +| io_consumption_message | Custom message for Mysql IO consumption monitor | string | `` | no | +| io_consumption_silenced | Groups to mute for Mysql IO consumption monitor | map | `` | no | +| io_consumption_threshold_critical | Mysql IO consumption in percent (critical threshold) | string | `90` | no | +| io_consumption_threshold_warning | Mysql IO consumption in percent (warning threshold) | string | `80` | no | +| io_consumption_time_aggregator | Monitor aggregator for Mysql IO consumption [available values: min, max or avg] | string | `min` | no | +| io_consumption_timeframe | Monitor timeframe for Mysql IO consumption [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | +| memory_usage_message | Custom message for Mysql memory monitor | string | `` | no | +| memory_usage_silenced | Groups to mute for Mysql memory monitor | map | `` | no | +| memory_usage_threshold_critical | Mysql memory usage in percent (critical threshold) | string | `90` | no | +| memory_usage_threshold_warning | Mysql memory usage in percent (warning threshold) | string | `80` | no | +| memory_usage_time_aggregator | Monitor aggregator for Mysql memory [available values: min, max or avg] | string | `min` | no | +| memory_usage_timeframe | Monitor timeframe for Mysql memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | +| message | Message sent when a Redis monitor is triggered | string | - | yes | +| no_connection_message | Custom message for Mysql no connection monitor | string | `` | no | +| no_connection_silenced | Groups to mute for Mysql no connection monitor | map | `` | no | +| no_connection_time_aggregator | Monitor aggregator for Mysql no connection [available values: min, max or avg] | string | `min` | no | +| no_connection_timeframe | Monitor timeframe for Mysql 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 | + +Related documentation +--------------------- + +DataDog documentation: [https://docs.datadoghq.com/integrations/azure/](https://docs.datadoghq.com/integrations/azure/) +You have to search `mysql` + +Azure Database for MySQL servers metrics documentation: [https://docs.microsoft.com/en-us/azure/mysql/concepts-monitoring](https://docs.microsoft.com/en-us/azure/mysql/concepts-monitoring) + diff --git a/cloud/azure/mysql/inputs.tf b/cloud/azure/mysql/inputs.tf new file mode 100644 index 0000000..29f9307 --- /dev/null +++ b/cloud/azure/mysql/inputs.tf @@ -0,0 +1,186 @@ +# Global Terraform +variable "environment" { + description = "Architecture environment" + type = "string" +} + +# Global DataDog +variable "message" { + description = "Message sent when a Redis monitor is triggered" +} + +variable "delay" { + description = "Delay in seconds for the metric evaluation" + default = 900 +} + +variable "filter_tags_use_defaults" { + description = "Use default filter tags convention" + default = "true" +} + +variable "filter_tags_custom" { + description = "Tags used for custom filtering when filter_tags_use_defaults is false" + default = "*" +} + +# Azure Mysql specific variables +variable "cpu_usage_silenced" { + description = "Groups to mute for Mysql CPU monitor" + type = "map" + default = {} +} + +variable "cpu_usage_message" { + description = "Custom message for Mysql CPU monitor" + type = "string" + default = "" +} + +variable "cpu_usage_time_aggregator" { + description = "Monitor aggregator for Mysql CPU [available values: min, max or avg]" + type = "string" + default = "min" +} + +variable "cpu_usage_timeframe" { + description = "Monitor timeframe for Mysql CPU [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + type = "string" + default = "last_15m" +} + +variable "cpu_usage_threshold_warning" { + description = "Mysql CPU usage in percent (warning threshold)" + default = "80" +} + +variable "cpu_usage_threshold_critical" { + description = "Mysql CPU usage in percent (critical threshold)" + default = "90" +} + +variable "no_connection_silenced" { + description = "Groups to mute for Mysql no connection monitor" + type = "map" + default = {} +} + +variable "no_connection_message" { + description = "Custom message for Mysql no connection monitor" + type = "string" + default = "" +} + +variable "no_connection_time_aggregator" { + description = "Monitor aggregator for Mysql no connection [available values: min, max or avg]" + type = "string" + default = "min" +} + +variable "no_connection_timeframe" { + description = "Monitor timeframe for Mysql no connection [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + type = "string" + default = "last_5m" +} + +variable "free_storage_silenced" { + description = "Groups to mute for Mysql Free Storage monitor" + type = "map" + default = {} +} + +variable "free_storage_message" { + description = "Custom message for Mysql Free Storage monitor" + type = "string" + default = "" +} + +variable "free_storage_time_aggregator" { + description = "Monitor aggregator for Mysql Free Storage [available values: min, max or avg]" + type = "string" + default = "min" +} + +variable "free_storage_timeframe" { + description = "Monitor timeframe for Mysql Free Storage [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + type = "string" + default = "last_15m" +} + +variable "free_storage_threshold_warning" { + description = "Mysql Free Storage remaining in percent (warning threshold)" + default = "20" +} + +variable "free_storage_threshold_critical" { + description = "Mysql Free Storage remaining in percent (critical threshold)" + default = "10" +} + +variable "io_consumption_silenced" { + description = "Groups to mute for Mysql IO consumption monitor" + type = "map" + default = {} +} + +variable "io_consumption_message" { + description = "Custom message for Mysql IO consumption monitor" + type = "string" + default = "" +} + +variable "io_consumption_time_aggregator" { + description = "Monitor aggregator for Mysql IO consumption [available values: min, max or avg]" + type = "string" + default = "min" +} + +variable "io_consumption_timeframe" { + description = "Monitor timeframe for Mysql IO consumption [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + type = "string" + default = "last_15m" +} + +variable "io_consumption_threshold_warning" { + description = "Mysql IO consumption in percent (warning threshold)" + default = "80" +} + +variable "io_consumption_threshold_critical" { + description = "Mysql IO consumption in percent (critical threshold)" + default = "90" +} + +variable "memory_usage_silenced" { + description = "Groups to mute for Mysql memory monitor" + type = "map" + default = {} +} + +variable "memory_usage_message" { + description = "Custom message for Mysql memory monitor" + type = "string" + default = "" +} + +variable "memory_usage_time_aggregator" { + description = "Monitor aggregator for Mysql memory [available values: min, max or avg]" + type = "string" + default = "min" +} + +variable "memory_usage_timeframe" { + description = "Monitor timeframe for Mysql memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + type = "string" + default = "last_15m" +} + +variable "memory_usage_threshold_warning" { + description = "Mysql memory usage in percent (warning threshold)" + default = "80" +} + +variable "memory_usage_threshold_critical" { + description = "Mysql memory usage in percent (critical threshold)" + default = "90" +} diff --git a/cloud/azure/mysql/monitors-mysql.tf b/cloud/azure/mysql/monitors-mysql.tf new file mode 100644 index 0000000..ddde5be --- /dev/null +++ b/cloud/azure/mysql/monitors-mysql.tf @@ -0,0 +1,162 @@ +data "template_file" "filter" { + template = "$${filter}" + + vars { + filter = "${var.filter_tags_use_defaults == "true" ? format("dd_monitoring:enabled,dd_azure_mysql:enabled,env:%s", var.environment) : "${var.filter_tags_custom}"}" + } +} + +resource "datadog_monitor" "mysql_cpu_usage" { + name = "[${var.environment}] Mysql Server CPU usage is high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + message = "${coalesce(var.cpu_usage_message, var.message)}" + + query = < ${var.cpu_usage_threshold_critical} + EOF + + type = "metric alert" + + thresholds { + critical = "${var.cpu_usage_threshold_critical}" + warning = "${var.cpu_usage_threshold_warning}" + } + + silenced = "${var.cpu_usage_silenced}" + + notify_no_data = true + evaluation_delay = "${var.delay}" + renotify_interval = 0 + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false + require_full_window = false + new_host_delay = "${var.delay}" + + tags = ["env:${var.environment}", "resource:mysql", "team:azure", "provider:azure"] +} + +resource "datadog_monitor" "mysql_no_connection" { + name = "[${var.environment}] Mysql Server has no connection" + message = "${coalesce(var.no_connection_message, var.message)}" + + query = < ${var.io_consumption_threshold_critical} + EOF + + type = "metric alert" + + thresholds { + critical = "${var.io_consumption_threshold_critical}" + warning = "${var.io_consumption_threshold_warning}" + } + + silenced = "${var.io_consumption_silenced}" + + notify_no_data = true + evaluation_delay = "${var.delay}" + renotify_interval = 0 + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false + require_full_window = false + new_host_delay = "${var.delay}" + + tags = ["env:${var.environment}", "resource:mysql", "team:azure", "provider:azure"] +} + +resource "datadog_monitor" "mysql_memory_usage" { + name = "[${var.environment}] Mysql Server memory usage is high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + message = "${coalesce(var.memory_usage_message, var.message)}" + + query = < ${var.memory_usage_threshold_critical} + EOF + + type = "metric alert" + + thresholds { + critical = "${var.memory_usage_threshold_critical}" + warning = "${var.memory_usage_threshold_warning}" + } + + silenced = "${var.memory_usage_silenced}" + + notify_no_data = true + evaluation_delay = "${var.delay}" + renotify_interval = 0 + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false + require_full_window = false + new_host_delay = "${var.delay}" + + tags = ["env:${var.environment}", "resource:mysql", "team:azure", "provider:azure"] +} From 805e2048432e74ea0d19920e8f26613763233574 Mon Sep 17 00:00:00 2001 From: Alexandre Gaillet Date: Thu, 12 Jul 2018 16:18:49 +0200 Subject: [PATCH 2/6] MON-246 - General Azure monitors updated with Azure Database MySQL Servers module --- cloud/azure/mysql/inputs.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/azure/mysql/inputs.tf b/cloud/azure/mysql/inputs.tf index 29f9307..ff5d994 100644 --- a/cloud/azure/mysql/inputs.tf +++ b/cloud/azure/mysql/inputs.tf @@ -24,7 +24,7 @@ variable "filter_tags_custom" { default = "*" } -# Azure Mysql specific variables +# Azure Databases for MySQL Servers specific variables variable "cpu_usage_silenced" { description = "Groups to mute for Mysql CPU monitor" type = "map" From a6f83a39e3d68319b1d00b291dce7ceaa09ffe23 Mon Sep 17 00:00:00 2001 From: Alexandre Gaillet Date: Tue, 24 Jul 2018 12:17:25 +0200 Subject: [PATCH 3/6] MON-246 - README regenerated and outputs generated --- README.md | 1 + cloud/azure/mysql/README.md | 40 +++++++++++++++++++++--------------- cloud/azure/mysql/outputs.tf | 24 ++++++++++++++++++++++ 3 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 cloud/azure/mysql/outputs.tf diff --git a/README.md b/README.md index 6b99830..8cf4768 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,7 @@ The `//` is very important, it's a terraform specific syntax used to separate gi - [eventhub](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/azure/eventhub/) - [iothubs](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/azure/iothubs/) - [keyvault](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/azure/keyvault/) + - [mysql](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/azure/mysql/) - [postgresql](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/azure/postgresql/) - [redis](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/azure/redis/) - [serverfarms](https://bitbucket.org/morea/terraform.feature.datadog/src/master/cloud/azure/serverfarms/) diff --git a/cloud/azure/mysql/README.md b/cloud/azure/mysql/README.md index 57cea90..3c159e1 100644 --- a/cloud/azure/mysql/README.md +++ b/cloud/azure/mysql/README.md @@ -1,30 +1,28 @@ -Azure Database for MySQL servers DataDog monitors -================================================= +# CLOUD AZURE MYSQL DataDog monitors -How to use this module ----------------------- +## How to use this module ``` -module "datadog-monitors-azure-mysql" { +module "datadog-monitors-cloud-azure-mysql" { source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//cloud/azure/mysql?ref={revision}" - message = "${module.datadog-message-alerting.alerting-message}" environment = "${var.environment}" + message = "${module.datadog-message-alerting.alerting-message}" } + ``` -Purpose -------- -Creates a DataDog monitors with the following checks : +## Purpose -* CPU Usage -* Memory Usage -* Free disk space -* No active connection -* IO consumption +Creates DataDog monitors with the following checks: -Inputs ------- +- Mysql Server CPU usage is high +- Mysql Server has no connection +- Mysql Server storage is running low +- Mysql Server IO consumption is high +- Mysql Server memory usage is high + +## Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| @@ -62,6 +60,16 @@ Inputs | no_connection_time_aggregator | Monitor aggregator for Mysql no connection [available values: min, max or avg] | string | `min` | no | | no_connection_timeframe | Monitor timeframe for Mysql 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 | +## Outputs + +| Name | Description | +|------|-------------| +| mysql_cpu_usage_id | id for monitor mysql_cpu_usage | +| mysql_free_storage_id | id for monitor mysql_free_storage | +| mysql_io_consumption_id | id for monitor mysql_io_consumption | +| mysql_memory_usage_id | id for monitor mysql_memory_usage | +| mysql_no_connection_id | id for monitor mysql_no_connection | + Related documentation --------------------- diff --git a/cloud/azure/mysql/outputs.tf b/cloud/azure/mysql/outputs.tf new file mode 100644 index 0000000..75c1c3d --- /dev/null +++ b/cloud/azure/mysql/outputs.tf @@ -0,0 +1,24 @@ +output "mysql_cpu_usage_id" { + description = "id for monitor mysql_cpu_usage" + value = "${datadog_monitor.mysql_cpu_usage.id}" +} + +output "mysql_no_connection_id" { + description = "id for monitor mysql_no_connection" + value = "${datadog_monitor.mysql_no_connection.id}" +} + +output "mysql_free_storage_id" { + description = "id for monitor mysql_free_storage" + value = "${datadog_monitor.mysql_free_storage.id}" +} + +output "mysql_io_consumption_id" { + description = "id for monitor mysql_io_consumption" + value = "${datadog_monitor.mysql_io_consumption.id}" +} + +output "mysql_memory_usage_id" { + description = "id for monitor mysql_memory_usage" + value = "${datadog_monitor.mysql_memory_usage.id}" +} From db30561ccd47182426168fe1543f22cb8fc7e14f Mon Sep 17 00:00:00 2001 From: Alexandre Gaillet Date: Wed, 26 Sep 2018 09:45:34 +0200 Subject: [PATCH 4/6] MON-246 - auto_updated.sh applied --- cloud/azure/mysql/README.md | 12 ++++++------ cloud/azure/mysql/modules.tf | 8 ++++++++ cloud/azure/mysql/outputs.tf | 10 +++++----- 3 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 cloud/azure/mysql/modules.tf diff --git a/cloud/azure/mysql/README.md b/cloud/azure/mysql/README.md index 3c159e1..aaed9e4 100644 --- a/cloud/azure/mysql/README.md +++ b/cloud/azure/mysql/README.md @@ -18,16 +18,16 @@ Creates DataDog monitors with the following checks: - Mysql Server CPU usage is high - Mysql Server has no connection -- Mysql Server storage is running low - Mysql Server IO consumption is high - Mysql Server memory usage is high +- Mysql Server storage is running low ## Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| | cpu_usage_message | Custom message for Mysql CPU monitor | string | `` | no | -| cpu_usage_silenced | Groups to mute for Mysql CPU monitor | map | `` | no | +| cpu_usage_silenced | Groups to mute for Mysql CPU monitor | map | `{}` | no | | cpu_usage_threshold_critical | Mysql CPU usage in percent (critical threshold) | string | `90` | no | | cpu_usage_threshold_warning | Mysql CPU usage in percent (warning threshold) | string | `80` | no | | cpu_usage_time_aggregator | Monitor aggregator for Mysql CPU [available values: min, max or avg] | string | `min` | no | @@ -37,26 +37,26 @@ Creates DataDog monitors with the following checks: | 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 | | free_storage_message | Custom message for Mysql Free Storage monitor | string | `` | no | -| free_storage_silenced | Groups to mute for Mysql Free Storage monitor | map | `` | no | +| free_storage_silenced | Groups to mute for Mysql Free Storage monitor | map | `{}` | no | | free_storage_threshold_critical | Mysql Free Storage remaining in percent (critical threshold) | string | `10` | no | | free_storage_threshold_warning | Mysql Free Storage remaining in percent (warning threshold) | string | `20` | no | | free_storage_time_aggregator | Monitor aggregator for Mysql Free Storage [available values: min, max or avg] | string | `min` | no | | free_storage_timeframe | Monitor timeframe for Mysql Free Storage [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | | io_consumption_message | Custom message for Mysql IO consumption monitor | string | `` | no | -| io_consumption_silenced | Groups to mute for Mysql IO consumption monitor | map | `` | no | +| io_consumption_silenced | Groups to mute for Mysql IO consumption monitor | map | `{}` | no | | io_consumption_threshold_critical | Mysql IO consumption in percent (critical threshold) | string | `90` | no | | io_consumption_threshold_warning | Mysql IO consumption in percent (warning threshold) | string | `80` | no | | io_consumption_time_aggregator | Monitor aggregator for Mysql IO consumption [available values: min, max or avg] | string | `min` | no | | io_consumption_timeframe | Monitor timeframe for Mysql IO consumption [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | | memory_usage_message | Custom message for Mysql memory monitor | string | `` | no | -| memory_usage_silenced | Groups to mute for Mysql memory monitor | map | `` | no | +| memory_usage_silenced | Groups to mute for Mysql memory monitor | map | `{}` | no | | memory_usage_threshold_critical | Mysql memory usage in percent (critical threshold) | string | `90` | no | | memory_usage_threshold_warning | Mysql memory usage in percent (warning threshold) | string | `80` | no | | memory_usage_time_aggregator | Monitor aggregator for Mysql memory [available values: min, max or avg] | string | `min` | no | | memory_usage_timeframe | Monitor timeframe for Mysql memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | | message | Message sent when a Redis monitor is triggered | string | - | yes | | no_connection_message | Custom message for Mysql no connection monitor | string | `` | no | -| no_connection_silenced | Groups to mute for Mysql no connection monitor | map | `` | no | +| no_connection_silenced | Groups to mute for Mysql no connection monitor | map | `{}` | no | | no_connection_time_aggregator | Monitor aggregator for Mysql no connection [available values: min, max or avg] | string | `min` | no | | no_connection_timeframe | Monitor timeframe for Mysql 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 | diff --git a/cloud/azure/mysql/modules.tf b/cloud/azure/mysql/modules.tf new file mode 100644 index 0000000..2f7c46c --- /dev/null +++ b/cloud/azure/mysql/modules.tf @@ -0,0 +1,8 @@ +module "filter-tags" { + source = "../../../common/filter-tags" + + environment = "${var.environment}" + resource = "mysql" + filter_tags_use_defaults = "${var.filter_tags_use_defaults}" + filter_tags_custom = "${var.filter_tags_custom}" +} diff --git a/cloud/azure/mysql/outputs.tf b/cloud/azure/mysql/outputs.tf index 75c1c3d..f037a3f 100644 --- a/cloud/azure/mysql/outputs.tf +++ b/cloud/azure/mysql/outputs.tf @@ -1,24 +1,24 @@ output "mysql_cpu_usage_id" { description = "id for monitor mysql_cpu_usage" - value = "${datadog_monitor.mysql_cpu_usage.id}" + value = "${datadog_monitor.mysql_cpu_usage.*.id}" } output "mysql_no_connection_id" { description = "id for monitor mysql_no_connection" - value = "${datadog_monitor.mysql_no_connection.id}" + value = "${datadog_monitor.mysql_no_connection.*.id}" } output "mysql_free_storage_id" { description = "id for monitor mysql_free_storage" - value = "${datadog_monitor.mysql_free_storage.id}" + value = "${datadog_monitor.mysql_free_storage.*.id}" } output "mysql_io_consumption_id" { description = "id for monitor mysql_io_consumption" - value = "${datadog_monitor.mysql_io_consumption.id}" + value = "${datadog_monitor.mysql_io_consumption.*.id}" } output "mysql_memory_usage_id" { description = "id for monitor mysql_memory_usage" - value = "${datadog_monitor.mysql_memory_usage.id}" + value = "${datadog_monitor.mysql_memory_usage.*.id}" } From bdfb100cbcc285c8d6f9019e1d905113df8e21c9 Mon Sep 17 00:00:00 2001 From: Alexandre Gaillet Date: Wed, 26 Sep 2018 15:17:41 +0200 Subject: [PATCH 5/6] MON-246 - compute consumption monitor added --- cloud/azure/mysql/README.md | 8 +++++++ cloud/azure/mysql/inputs.tf | 34 +++++++++++++++++++++++++++++ cloud/azure/mysql/monitors-mysql.tf | 32 +++++++++++++++++++++++++++ cloud/azure/mysql/outputs.tf | 5 +++++ 4 files changed, 79 insertions(+) diff --git a/cloud/azure/mysql/README.md b/cloud/azure/mysql/README.md index aaed9e4..b8ccb26 100644 --- a/cloud/azure/mysql/README.md +++ b/cloud/azure/mysql/README.md @@ -16,6 +16,7 @@ module "datadog-monitors-cloud-azure-mysql" { Creates DataDog monitors with the following checks: +- Mysql Server compute consumption is high - Mysql Server CPU usage is high - Mysql Server has no connection - Mysql Server IO consumption is high @@ -26,6 +27,12 @@ Creates DataDog monitors with the following checks: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| compute_consumption_message | Custom message for Mysql compute consumption monitor | string | `` | no | +| compute_consumption_silenced | Groups to mute for Mysql compute consumption monitor | map | `{}` | no | +| compute_consumption_threshold_critical | Mysql compute consumption in percent (critical threshold) | string | `90` | no | +| compute_consumption_threshold_warning | Mysql compute consumption in percent (warning threshold) | string | `80` | no | +| compute_consumption_time_aggregator | Monitor aggregator for Mysql compute consumption [available values: min, max or avg] | string | `min` | no | +| compute_consumption_timeframe | Monitor timeframe for Mysql compute consumption [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | | cpu_usage_message | Custom message for Mysql CPU monitor | string | `` | no | | cpu_usage_silenced | Groups to mute for Mysql CPU monitor | map | `{}` | no | | cpu_usage_threshold_critical | Mysql CPU usage in percent (critical threshold) | string | `90` | no | @@ -64,6 +71,7 @@ Creates DataDog monitors with the following checks: | Name | Description | |------|-------------| +| mysql_compute_consumption_id | id for monitor mysql_compute_consumption | | mysql_cpu_usage_id | id for monitor mysql_cpu_usage | | mysql_free_storage_id | id for monitor mysql_free_storage | | mysql_io_consumption_id | id for monitor mysql_io_consumption | diff --git a/cloud/azure/mysql/inputs.tf b/cloud/azure/mysql/inputs.tf index ff5d994..d36d15d 100644 --- a/cloud/azure/mysql/inputs.tf +++ b/cloud/azure/mysql/inputs.tf @@ -151,6 +151,40 @@ variable "io_consumption_threshold_critical" { default = "90" } +variable "compute_consumption_silenced" { + description = "Groups to mute for Mysql compute consumption monitor" + type = "map" + default = {} +} + +variable "compute_consumption_message" { + description = "Custom message for Mysql compute consumption monitor" + type = "string" + default = "" +} + +variable "compute_consumption_time_aggregator" { + description = "Monitor aggregator for Mysql compute consumption [available values: min, max or avg]" + type = "string" + default = "min" +} + +variable "compute_consumption_timeframe" { + description = "Monitor timeframe for Mysql compute consumption [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + type = "string" + default = "last_15m" +} + +variable "compute_consumption_threshold_warning" { + description = "Mysql compute consumption in percent (warning threshold)" + default = "80" +} + +variable "compute_consumption_threshold_critical" { + description = "Mysql compute consumption in percent (critical threshold)" + default = "90" +} + variable "memory_usage_silenced" { description = "Groups to mute for Mysql memory monitor" type = "map" diff --git a/cloud/azure/mysql/monitors-mysql.tf b/cloud/azure/mysql/monitors-mysql.tf index ddde5be..6a4e6a6 100644 --- a/cloud/azure/mysql/monitors-mysql.tf +++ b/cloud/azure/mysql/monitors-mysql.tf @@ -129,6 +129,38 @@ resource "datadog_monitor" "mysql_io_consumption" { tags = ["env:${var.environment}", "resource:mysql", "team:azure", "provider:azure"] } +resource "datadog_monitor" "mysql_compute_consumption" { + name = "[${var.environment}] Mysql Server compute consumption is high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + message = "${coalesce(var.compute_consumption_message, var.message)}" + + query = < ${var.compute_consumption_threshold_critical} + EOF + + type = "metric alert" + + thresholds { + critical = "${var.compute_consumption_threshold_critical}" + warning = "${var.compute_consumption_threshold_warning}" + } + + silenced = "${var.compute_consumption_silenced}" + + notify_no_data = true + evaluation_delay = "${var.delay}" + renotify_interval = 0 + notify_audit = false + timeout_h = 0 + include_tags = true + locked = false + require_full_window = false + new_host_delay = "${var.delay}" + + tags = ["env:${var.environment}", "resource:mysql", "team:azure", "provider:azure"] +} + resource "datadog_monitor" "mysql_memory_usage" { name = "[${var.environment}] Mysql Server memory usage is high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.memory_usage_message, var.message)}" diff --git a/cloud/azure/mysql/outputs.tf b/cloud/azure/mysql/outputs.tf index f037a3f..b064939 100644 --- a/cloud/azure/mysql/outputs.tf +++ b/cloud/azure/mysql/outputs.tf @@ -18,6 +18,11 @@ output "mysql_io_consumption_id" { value = "${datadog_monitor.mysql_io_consumption.*.id}" } +output "mysql_compute_consumption_id" { + description = "id for monitor mysql_compute_consumption" + value = "${datadog_monitor.mysql_compute_consumption.*.id}" +} + output "mysql_memory_usage_id" { description = "id for monitor mysql_memory_usage" value = "${datadog_monitor.mysql_memory_usage.*.id}" From be59a0030cad0f412e2de3d15d42cf10adf2b525 Mon Sep 17 00:00:00 2001 From: Alexandre Gaillet Date: Fri, 28 Sep 2018 14:04:50 +0200 Subject: [PATCH 6/6] MON-246 - Best practice applied --- cloud/azure/mysql/README.md | 27 ++++++--- cloud/azure/mysql/inputs.tf | 87 +++++++++++++++++++++++++++-- cloud/azure/mysql/monitors-mysql.tf | 82 +++++++++++++-------------- 3 files changed, 142 insertions(+), 54 deletions(-) diff --git a/cloud/azure/mysql/README.md b/cloud/azure/mysql/README.md index b8ccb26..a60f4f3 100644 --- a/cloud/azure/mysql/README.md +++ b/cloud/azure/mysql/README.md @@ -16,52 +16,65 @@ module "datadog-monitors-cloud-azure-mysql" { Creates DataDog monitors with the following checks: -- Mysql Server compute consumption is high -- Mysql Server CPU usage is high +- Mysql Server compute consumption +- Mysql Server CPU usage - Mysql Server has no connection -- Mysql Server IO consumption is high -- Mysql Server memory usage is high -- Mysql Server storage is running low +- Mysql Server IO consumption +- Mysql Server memory usage +- Mysql Server storage ## Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| +| compute_consumption_enabled | Flag to enable Mysql status monitor | string | `true` | no | +| compute_consumption_extra_tags | Extra tags for Mysql status monitor | list | `[]` | no | | compute_consumption_message | Custom message for Mysql compute consumption monitor | string | `` | no | | compute_consumption_silenced | Groups to mute for Mysql compute consumption monitor | map | `{}` | no | | compute_consumption_threshold_critical | Mysql compute consumption in percent (critical threshold) | string | `90` | no | | compute_consumption_threshold_warning | Mysql compute consumption in percent (warning threshold) | string | `80` | no | | compute_consumption_time_aggregator | Monitor aggregator for Mysql compute consumption [available values: min, max or avg] | string | `min` | no | | compute_consumption_timeframe | Monitor timeframe for Mysql compute consumption [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | +| cpu_usage_enabled | Flag to enable Mysql status monitor | string | `true` | no | +| cpu_usage_extra_tags | Extra tags for Mysql status monitor | list | `[]` | no | | cpu_usage_message | Custom message for Mysql CPU monitor | string | `` | no | | cpu_usage_silenced | Groups to mute for Mysql CPU monitor | map | `{}` | no | | cpu_usage_threshold_critical | Mysql CPU usage in percent (critical threshold) | string | `90` | no | | cpu_usage_threshold_warning | Mysql CPU usage in percent (warning threshold) | string | `80` | no | | cpu_usage_time_aggregator | Monitor aggregator for Mysql CPU [available values: min, max or avg] | string | `min` | no | | cpu_usage_timeframe | Monitor timeframe for Mysql 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 | | environment | Architecture environment | string | - | yes | +| evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no | | 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 | +| free_storage_enabled | Flag to enable Mysql status monitor | string | `true` | no | +| free_storage_extra_tags | Extra tags for Mysql status monitor | list | `[]` | no | | free_storage_message | Custom message for Mysql Free Storage monitor | string | `` | no | | free_storage_silenced | Groups to mute for Mysql Free Storage monitor | map | `{}` | no | | free_storage_threshold_critical | Mysql Free Storage remaining in percent (critical threshold) | string | `10` | no | | free_storage_threshold_warning | Mysql Free Storage remaining in percent (warning threshold) | string | `20` | no | | free_storage_time_aggregator | Monitor aggregator for Mysql Free Storage [available values: min, max or avg] | string | `min` | no | | free_storage_timeframe | Monitor timeframe for Mysql Free Storage [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | +| io_consumption_enabled | Flag to enable Mysql status monitor | string | `true` | no | +| io_consumption_extra_tags | Extra tags for Mysql status monitor | list | `[]` | no | | io_consumption_message | Custom message for Mysql IO consumption monitor | string | `` | no | | io_consumption_silenced | Groups to mute for Mysql IO consumption monitor | map | `{}` | no | | io_consumption_threshold_critical | Mysql IO consumption in percent (critical threshold) | string | `90` | no | | io_consumption_threshold_warning | Mysql IO consumption in percent (warning threshold) | string | `80` | no | | io_consumption_time_aggregator | Monitor aggregator for Mysql IO consumption [available values: min, max or avg] | string | `min` | no | | io_consumption_timeframe | Monitor timeframe for Mysql IO consumption [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | +| memory_usage_enabled | Flag to enable Mysql status monitor | string | `true` | no | +| memory_usage_extra_tags | Extra tags for Mysql status monitor | list | `[]` | no | | memory_usage_message | Custom message for Mysql memory monitor | string | `` | no | | memory_usage_silenced | Groups to mute for Mysql memory monitor | map | `{}` | no | | memory_usage_threshold_critical | Mysql memory usage in percent (critical threshold) | string | `90` | no | | memory_usage_threshold_warning | Mysql memory usage in percent (warning threshold) | string | `80` | no | | memory_usage_time_aggregator | Monitor aggregator for Mysql memory [available values: min, max or avg] | string | `min` | no | | memory_usage_timeframe | Monitor timeframe for Mysql memory [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | -| message | Message sent when a Redis monitor is triggered | string | - | yes | +| message | Message sent when an alert is triggered | string | - | yes | +| new_host_delay | Delay in seconds before monitor new resource | string | `300` | no | +| no_connection_enabled | Flag to enable Mysql status monitor | string | `true` | no | +| no_connection_extra_tags | Extra tags for Mysql status monitor | list | `[]` | no | | no_connection_message | Custom message for Mysql no connection monitor | string | `` | no | | no_connection_silenced | Groups to mute for Mysql no connection monitor | map | `{}` | no | | no_connection_time_aggregator | Monitor aggregator for Mysql no connection [available values: min, max or avg] | string | `min` | no | diff --git a/cloud/azure/mysql/inputs.tf b/cloud/azure/mysql/inputs.tf index d36d15d..6a37a24 100644 --- a/cloud/azure/mysql/inputs.tf +++ b/cloud/azure/mysql/inputs.tf @@ -5,15 +5,20 @@ variable "environment" { } # Global DataDog -variable "message" { - description = "Message sent when a Redis monitor is triggered" -} - -variable "delay" { +variable "evaluation_delay" { description = "Delay in seconds for the metric evaluation" default = 900 } +variable "new_host_delay" { + description = "Delay in seconds before monitor new resource" + default = 300 +} + +variable "message" { + description = "Message sent when an alert is triggered" +} + variable "filter_tags_use_defaults" { description = "Use default filter tags convention" default = "true" @@ -31,6 +36,18 @@ variable "cpu_usage_silenced" { default = {} } +variable "cpu_usage_enabled" { + description = "Flag to enable Mysql status monitor" + type = "string" + default = "true" +} + +variable "cpu_usage_extra_tags" { + description = "Extra tags for Mysql status monitor" + type = "list" + default = [] +} + variable "cpu_usage_message" { description = "Custom message for Mysql CPU monitor" type = "string" @@ -65,6 +82,18 @@ variable "no_connection_silenced" { default = {} } +variable "no_connection_enabled" { + description = "Flag to enable Mysql status monitor" + type = "string" + default = "true" +} + +variable "no_connection_extra_tags" { + description = "Extra tags for Mysql status monitor" + type = "list" + default = [] +} + variable "no_connection_message" { description = "Custom message for Mysql no connection monitor" type = "string" @@ -89,6 +118,18 @@ variable "free_storage_silenced" { default = {} } +variable "free_storage_enabled" { + description = "Flag to enable Mysql status monitor" + type = "string" + default = "true" +} + +variable "free_storage_extra_tags" { + description = "Extra tags for Mysql status monitor" + type = "list" + default = [] +} + variable "free_storage_message" { description = "Custom message for Mysql Free Storage monitor" type = "string" @@ -123,6 +164,18 @@ variable "io_consumption_silenced" { default = {} } +variable "io_consumption_enabled" { + description = "Flag to enable Mysql status monitor" + type = "string" + default = "true" +} + +variable "io_consumption_extra_tags" { + description = "Extra tags for Mysql status monitor" + type = "list" + default = [] +} + variable "io_consumption_message" { description = "Custom message for Mysql IO consumption monitor" type = "string" @@ -157,6 +210,18 @@ variable "compute_consumption_silenced" { default = {} } +variable "compute_consumption_enabled" { + description = "Flag to enable Mysql status monitor" + type = "string" + default = "true" +} + +variable "compute_consumption_extra_tags" { + description = "Extra tags for Mysql status monitor" + type = "list" + default = [] +} + variable "compute_consumption_message" { description = "Custom message for Mysql compute consumption monitor" type = "string" @@ -191,6 +256,18 @@ variable "memory_usage_silenced" { default = {} } +variable "memory_usage_enabled" { + description = "Flag to enable Mysql status monitor" + type = "string" + default = "true" +} + +variable "memory_usage_extra_tags" { + description = "Extra tags for Mysql status monitor" + type = "list" + default = [] +} + variable "memory_usage_message" { description = "Custom message for Mysql memory monitor" type = "string" diff --git a/cloud/azure/mysql/monitors-mysql.tf b/cloud/azure/mysql/monitors-mysql.tf index 6a4e6a6..4b0214f 100644 --- a/cloud/azure/mysql/monitors-mysql.tf +++ b/cloud/azure/mysql/monitors-mysql.tf @@ -1,18 +1,11 @@ -data "template_file" "filter" { - template = "$${filter}" - - vars { - filter = "${var.filter_tags_use_defaults == "true" ? format("dd_monitoring:enabled,dd_azure_mysql:enabled,env:%s", var.environment) : "${var.filter_tags_custom}"}" - } -} - resource "datadog_monitor" "mysql_cpu_usage" { - name = "[${var.environment}] Mysql Server CPU usage is high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + count = "${var.cpu_usage_enabled ? 1 : 0}" + name = "[${var.environment}] Mysql Server CPU usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.cpu_usage_message, var.message)}" query = < ${var.cpu_usage_threshold_critical} EOF @@ -25,26 +18,27 @@ resource "datadog_monitor" "mysql_cpu_usage" { silenced = "${var.cpu_usage_silenced}" - notify_no_data = true - evaluation_delay = "${var.delay}" + notify_no_data = false + evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false - new_host_delay = "${var.delay}" + new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "resource:mysql", "team:azure", "provider:azure"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:mysql", "team:claranet", "created-by:terraform", "${var.cpu_usage_extra_tags}"] } resource "datadog_monitor" "mysql_no_connection" { + count = "${var.no_connection_enabled ? 1 : 0}" name = "[${var.environment}] Mysql Server has no connection" message = "${coalesce(var.no_connection_message, var.message)}" query = < ${var.io_consumption_threshold_critical} EOF @@ -116,26 +112,27 @@ resource "datadog_monitor" "mysql_io_consumption" { silenced = "${var.io_consumption_silenced}" - notify_no_data = true - evaluation_delay = "${var.delay}" + notify_no_data = false + evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false - new_host_delay = "${var.delay}" + new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "resource:mysql", "team:azure", "provider:azure"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:mysql", "team:claranet", "created-by:terraform", "${var.io_consumption_extra_tags}"] } resource "datadog_monitor" "mysql_compute_consumption" { - name = "[${var.environment}] Mysql Server compute consumption is high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + count = "${var.compute_consumption_enabled ? 1 : 0}" + name = "[${var.environment}] Mysql Server compute consumption {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.compute_consumption_message, var.message)}" query = < ${var.compute_consumption_threshold_critical} EOF @@ -148,26 +145,27 @@ resource "datadog_monitor" "mysql_compute_consumption" { silenced = "${var.compute_consumption_silenced}" - notify_no_data = true - evaluation_delay = "${var.delay}" + notify_no_data = false + evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false - new_host_delay = "${var.delay}" + new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "resource:mysql", "team:azure", "provider:azure"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:mysql", "team:claranet", "created-by:terraform", "${var.compute_consumption_extra_tags}"] } resource "datadog_monitor" "mysql_memory_usage" { - name = "[${var.environment}] Mysql Server memory usage is high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + count = "${var.memory_usage_enabled ? 1 : 0}" + name = "[${var.environment}] Mysql Server memory usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.memory_usage_message, var.message)}" query = < ${var.memory_usage_threshold_critical} EOF @@ -180,15 +178,15 @@ resource "datadog_monitor" "mysql_memory_usage" { silenced = "${var.memory_usage_silenced}" - notify_no_data = true - evaluation_delay = "${var.delay}" + notify_no_data = false + evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false - new_host_delay = "${var.delay}" + new_host_delay = "${var.new_host_delay}" - tags = ["env:${var.environment}", "resource:mysql", "team:azure", "provider:azure"] + tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:mysql", "team:claranet", "created-by:terraform", "${var.memory_usage_extra_tags}"] }