diff --git a/cloud/azure/sql-database/README.md b/cloud/azure/sql-database/README.md index ba77f2f..ad8edf1 100644 --- a/cloud/azure/sql-database/README.md +++ b/cloud/azure/sql-database/README.md @@ -19,8 +19,8 @@ Creates DataDog monitors with the following checks: - SQL Database CPU too high - SQL Database Deadlocks too high - SQL Database DTU Consumption too high +- SQL Database high disk usage - SQL Database is down -- SQL Database low free space ## Inputs diff --git a/cloud/azure/sql-database/monitors-sql-database.tf b/cloud/azure/sql-database/monitors-sql-database.tf index 40bdc05..e7e563d 100644 --- a/cloud/azure/sql-database/monitors-sql-database.tf +++ b/cloud/azure/sql-database/monitors-sql-database.tf @@ -41,11 +41,12 @@ resource "datadog_monitor" "sql-database_cpu" { thresholds { critical = "${var.cpu_threshold_critical}" + warning = "${var.cpu_threshold_warning}" } silenced = "${var.cpu_silenced}" - notify_no_data = true + notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 notify_audit = false @@ -60,7 +61,7 @@ resource "datadog_monitor" "sql-database_cpu" { resource "datadog_monitor" "sql-database_free_space_low" { count = "${var.diskspace_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] SQL Database low free space {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] SQL Database high disk usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.diskspace_message, var.message)}" type = "metric alert" @@ -78,7 +79,7 @@ resource "datadog_monitor" "sql-database_free_space_low" { silenced = "${var.diskspace_silenced}" - notify_no_data = true + notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 notify_audit = false @@ -111,7 +112,7 @@ resource "datadog_monitor" "sql-database_dtu_consumption_high" { silenced = "${var.dtu_silenced}" - notify_no_data = true + notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 notify_audit = false diff --git a/cloud/azure/sql-elasticpool/README.md b/cloud/azure/sql-elasticpool/README.md index c6bf285..39deae3 100644 --- a/cloud/azure/sql-elasticpool/README.md +++ b/cloud/azure/sql-elasticpool/README.md @@ -18,7 +18,7 @@ Creates DataDog monitors with the following checks: - SQL Elastic Pool CPU too high - SQL Elastic Pool DTU Consumption too high -- SQL Elastic Pool low free space +- SQL Elastic Pool high disk usage ## Inputs diff --git a/cloud/azure/sql-elasticpool/monitors-sql-elasticpool.tf b/cloud/azure/sql-elasticpool/monitors-sql-elasticpool.tf index d0b2a9b..06e658b 100644 --- a/cloud/azure/sql-elasticpool/monitors-sql-elasticpool.tf +++ b/cloud/azure/sql-elasticpool/monitors-sql-elasticpool.tf @@ -13,6 +13,7 @@ resource "datadog_monitor" "sql_elasticpool_cpu" { thresholds { critical = "${var.cpu_threshold_critical}" + warning = "${var.cpu_threshold_warning}" } silenced = "${var.cpu_silenced}" @@ -32,7 +33,7 @@ resource "datadog_monitor" "sql_elasticpool_cpu" { resource "datadog_monitor" "sql_elasticpool_free_space_low" { count = "${var.diskspace_enabled == "true" ? 1 : 0}" - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] SQL Elastic Pool low free space {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] SQL Elastic Pool high disk usage {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.diskspace_message, var.message)}" type = "metric alert" @@ -50,7 +51,7 @@ resource "datadog_monitor" "sql_elasticpool_free_space_low" { silenced = "${var.diskspace_silenced}" - notify_no_data = true + notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 notify_audit = false @@ -83,7 +84,7 @@ resource "datadog_monitor" "sql_elasticpool_dtu_consumption_high" { silenced = "${var.dtu_silenced}" - notify_no_data = true + notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 notify_audit = false