MON-446 Azure SQL Elastic Pool monitors updates
Also harmonize SQL databases monitors
This commit is contained in:
parent
97b313f3db
commit
ce742a20a2
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user