From 1dce1a96d4bc55ee70776d7cebdc37f2b3f468db Mon Sep 17 00:00:00 2001 From: "gauthier.ampe@fr.clara.net" Date: Fri, 2 Aug 2019 17:27:41 +0200 Subject: [PATCH 1/8] MON-489 Add monitor free disk space --- cloud/azure/virtual-machine/inputs.tf | 38 +++++++++++++++++++ .../monitors-virtual-machine.tf | 35 ++++++++++++++++- 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/cloud/azure/virtual-machine/inputs.tf b/cloud/azure/virtual-machine/inputs.tf index e217570..eb4f855 100644 --- a/cloud/azure/virtual-machine/inputs.tf +++ b/cloud/azure/virtual-machine/inputs.tf @@ -191,4 +191,42 @@ variable "ram_reserved_threshold_critical" { default = 95 } +variable "filesystem_free_disk_space_low_enabled" { + description = "Flag to enable Virtual Machine status monitor" + type = string + default = "true" +} +variable "filesystem_free_disk_space_low_time_aggregator" { + description = "Monitor aggregator for Virtual Machine free disk space [available values: min, max or avg]" + type = string + default = "avg" +} + +variable "filesystem_free_disk_space_low_timeframe" { + description = "Monitor timeframe for Virtual Machine free disk space too low [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 "filesystem_free_disk_space_low_threshold_critical" { + description = "Virtual Machine free disk space in percent (critical threshold)" + default = "5" +} + +variable "filesystem_free_disk_space_low_threshold_warning" { + description = "Virtual Machine free disk space in percent (warning threshold)" + default = "10" +} + +variable "filesystem_free_disk_space_low_extra_tags" { + description = "Extra tags for Virtual Machine free disk space monitor" + type = list(string) + default = [] +} + +variable "filesystem_free_disk_space_low_message" { + description = "Custom message for Virtual Machine CPU free disk space monitor" + type = string + default = "" +} diff --git a/cloud/azure/virtual-machine/monitors-virtual-machine.tf b/cloud/azure/virtual-machine/monitors-virtual-machine.tf index 8aa4aac..6304571 100644 --- a/cloud/azure/virtual-machine/monitors-virtual-machine.tf +++ b/cloud/azure/virtual-machine/monitors-virtual-machine.tf @@ -105,7 +105,7 @@ resource "datadog_monitor" "virtualmachine_ram_reserved" { type = "query alert" query = < Date: Fri, 2 Aug 2019 17:30:27 +0200 Subject: [PATCH 2/8] MON-489 Auto update --- cloud/azure/virtual-machine/README.md | 9 +++++++++ cloud/azure/virtual-machine/outputs.tf | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/cloud/azure/virtual-machine/README.md b/cloud/azure/virtual-machine/README.md index d4d346c..a72f233 100644 --- a/cloud/azure/virtual-machine/README.md +++ b/cloud/azure/virtual-machine/README.md @@ -18,6 +18,7 @@ Creates DataDog monitors with the following checks: - Virtual Machine CPU usage - Virtual Machine credit CPU +- Virtual Machine filesystem disk space too low - Virtual Machine is unreachable - Virtual Machine RAM reserved @@ -41,6 +42,13 @@ Creates DataDog monitors with the following checks: | cpu\_usage\_timeframe | Monitor timeframe for Virtual Machine CPU [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_15m"` | no | | environment | Architecture environment | string | n/a | yes | | evaluation\_delay | Delay in seconds for the metric evaluation | string | `"900"` | no | +| filesystem\_free\_disk\_space\_low\_enabled | Flag to enable Virtual Machine status monitor | string | `"true"` | no | +| filesystem\_free\_disk\_space\_low\_extra\_tags | Extra tags for Virtual Machine free disk space monitor | list(string) | `[]` | no | +| filesystem\_free\_disk\_space\_low\_message | Custom message for Virtual Machine CPU free disk space monitor | string | `""` | no | +| filesystem\_free\_disk\_space\_low\_threshold\_critical | Virtual Machine free disk space in percent (critical threshold) | string | `"5"` | no | +| filesystem\_free\_disk\_space\_low\_threshold\_warning | Virtual Machine free disk space in percent (warning threshold) | string | `"10"` | no | +| filesystem\_free\_disk\_space\_low\_time\_aggregator | Monitor aggregator for Virtual Machine free disk space [available values: min, max or avg] | string | `"avg"` | no | +| filesystem\_free\_disk\_space\_low\_timeframe | Monitor timeframe for Virtual Machine free disk space too low [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_15m"` | no | | filter\_tags\_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `"*"` | no | | filter\_tags\_custom\_excluded | Tags excluded for custom filtering when filter_tags_use_defaults is false | string | `""` | no | | filter\_tags\_use\_defaults | Use default filter tags convention | string | `"true"` | no | @@ -66,6 +74,7 @@ Creates DataDog monitors with the following checks: |------|-------------| | virtualmachine\_cpu\_usage\_id | id for monitor virtualmachine_cpu_usage | | virtualmachine\_credit\_cpu\_remaining\_too\_low\_id | id for monitor virtualmachine_credit_cpu_remaining_too_low | +| virtualmachine\_free\_filesystem\_disk\_space\_low\_id | id for monitor virtualmachine_free_filesystem_disk_space_low | | virtualmachine\_ram\_reserved\_id | id for monitor virtualmachine_ram_reserved | | virtualmachine\_status\_id | id for monitor virtualmachine_status | diff --git a/cloud/azure/virtual-machine/outputs.tf b/cloud/azure/virtual-machine/outputs.tf index 5863d30..4867671 100644 --- a/cloud/azure/virtual-machine/outputs.tf +++ b/cloud/azure/virtual-machine/outputs.tf @@ -18,3 +18,8 @@ output "virtualmachine_ram_reserved_id" { value = datadog_monitor.virtualmachine_ram_reserved.*.id } +output "virtualmachine_free_filesystem_disk_space_low_id" { + description = "id for monitor virtualmachine_free_filesystem_disk_space_low" + value = datadog_monitor.virtualmachine_free_filesystem_disk_space_low.*.id +} + From 8dea889216a454140678efb1f7572c34b4e6c4f9 Mon Sep 17 00:00:00 2001 From: "gauthier.ampe@fr.clara.net" Date: Mon, 5 Aug 2019 17:52:53 +0200 Subject: [PATCH 3/8] MON-489 remove parentheses useless and change variables naming --- cloud/azure/virtual-machine/inputs.tf | 14 ++++++------- .../monitors-virtual-machine.tf | 20 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/cloud/azure/virtual-machine/inputs.tf b/cloud/azure/virtual-machine/inputs.tf index eb4f855..8072d8d 100644 --- a/cloud/azure/virtual-machine/inputs.tf +++ b/cloud/azure/virtual-machine/inputs.tf @@ -191,41 +191,41 @@ variable "ram_reserved_threshold_critical" { default = 95 } -variable "filesystem_free_disk_space_low_enabled" { +variable "free_disk_space_low_enabled" { description = "Flag to enable Virtual Machine status monitor" type = string default = "true" } -variable "filesystem_free_disk_space_low_time_aggregator" { +variable "free_disk_space_low_time_aggregator" { description = "Monitor aggregator for Virtual Machine free disk space [available values: min, max or avg]" type = string default = "avg" } -variable "filesystem_free_disk_space_low_timeframe" { +variable "free_disk_space_low_timeframe" { description = "Monitor timeframe for Virtual Machine free disk space too low [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 "filesystem_free_disk_space_low_threshold_critical" { +variable "free_disk_space_low_threshold_critical" { description = "Virtual Machine free disk space in percent (critical threshold)" default = "5" } -variable "filesystem_free_disk_space_low_threshold_warning" { +variable "free_disk_space_low_threshold_warning" { description = "Virtual Machine free disk space in percent (warning threshold)" default = "10" } -variable "filesystem_free_disk_space_low_extra_tags" { +variable "free_disk_space_low_extra_tags" { description = "Extra tags for Virtual Machine free disk space monitor" type = list(string) default = [] } -variable "filesystem_free_disk_space_low_message" { +variable "free_disk_space_low_message" { description = "Custom message for Virtual Machine CPU free disk space monitor" type = string default = "" diff --git a/cloud/azure/virtual-machine/monitors-virtual-machine.tf b/cloud/azure/virtual-machine/monitors-virtual-machine.tf index 6304571..5e77413 100644 --- a/cloud/azure/virtual-machine/monitors-virtual-machine.tf +++ b/cloud/azure/virtual-machine/monitors-virtual-machine.tf @@ -134,21 +134,21 @@ EOQ } } -resource "datadog_monitor" "virtualmachine_free_filesystem_disk_space_low" { - count = var.filesystem_free_disk_space_low_enabled == "true" ? 1 : 0 - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Virtual Machine filesystem disk space too low {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = coalesce(var.filesystem_free_disk_space_low_message, var.message) +resource "datadog_monitor" "virtualmachine_free_disk_space_low" { + count = var.free_disk_space_low_enabled == "true" ? 1 : 0 + name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Virtual Machine disk space too low {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + message = coalesce(var.free_disk_space_low_message, var.message) type = "query alert" query = < Date: Mon, 5 Aug 2019 17:56:50 +0200 Subject: [PATCH 4/8] MON-489 Auto update --- cloud/azure/virtual-machine/README.md | 18 +++++++++--------- cloud/azure/virtual-machine/outputs.tf | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cloud/azure/virtual-machine/README.md b/cloud/azure/virtual-machine/README.md index a72f233..0155d0e 100644 --- a/cloud/azure/virtual-machine/README.md +++ b/cloud/azure/virtual-machine/README.md @@ -18,7 +18,7 @@ Creates DataDog monitors with the following checks: - Virtual Machine CPU usage - Virtual Machine credit CPU -- Virtual Machine filesystem disk space too low +- Virtual Machine disk space too low - Virtual Machine is unreachable - Virtual Machine RAM reserved @@ -42,16 +42,16 @@ Creates DataDog monitors with the following checks: | cpu\_usage\_timeframe | Monitor timeframe for Virtual Machine CPU [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_15m"` | no | | environment | Architecture environment | string | n/a | yes | | evaluation\_delay | Delay in seconds for the metric evaluation | string | `"900"` | no | -| filesystem\_free\_disk\_space\_low\_enabled | Flag to enable Virtual Machine status monitor | string | `"true"` | no | -| filesystem\_free\_disk\_space\_low\_extra\_tags | Extra tags for Virtual Machine free disk space monitor | list(string) | `[]` | no | -| filesystem\_free\_disk\_space\_low\_message | Custom message for Virtual Machine CPU free disk space monitor | string | `""` | no | -| filesystem\_free\_disk\_space\_low\_threshold\_critical | Virtual Machine free disk space in percent (critical threshold) | string | `"5"` | no | -| filesystem\_free\_disk\_space\_low\_threshold\_warning | Virtual Machine free disk space in percent (warning threshold) | string | `"10"` | no | -| filesystem\_free\_disk\_space\_low\_time\_aggregator | Monitor aggregator for Virtual Machine free disk space [available values: min, max or avg] | string | `"avg"` | no | -| filesystem\_free\_disk\_space\_low\_timeframe | Monitor timeframe for Virtual Machine free disk space too low [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_15m"` | no | | filter\_tags\_custom | Tags used for custom filtering when filter_tags_use_defaults is false | string | `"*"` | no | | filter\_tags\_custom\_excluded | Tags excluded 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\_disk\_space\_low\_enabled | Flag to enable Virtual Machine status monitor | string | `"true"` | no | +| free\_disk\_space\_low\_extra\_tags | Extra tags for Virtual Machine free disk space monitor | list(string) | `[]` | no | +| free\_disk\_space\_low\_message | Custom message for Virtual Machine CPU free disk space monitor | string | `""` | no | +| free\_disk\_space\_low\_threshold\_critical | Virtual Machine free disk space in percent (critical threshold) | string | `"5"` | no | +| free\_disk\_space\_low\_threshold\_warning | Virtual Machine free disk space in percent (warning threshold) | string | `"10"` | no | +| free\_disk\_space\_low\_time\_aggregator | Monitor aggregator for Virtual Machine free disk space [available values: min, max or avg] | string | `"avg"` | no | +| free\_disk\_space\_low\_timeframe | Monitor timeframe for Virtual Machine free disk space too low [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 | n/a | yes | | new\_host\_delay | Delay in seconds before monitor new resource | string | `"300"` | no | | prefix\_slug | Prefix string to prepend between brackets on every monitors names | string | `""` | no | @@ -74,7 +74,7 @@ Creates DataDog monitors with the following checks: |------|-------------| | virtualmachine\_cpu\_usage\_id | id for monitor virtualmachine_cpu_usage | | virtualmachine\_credit\_cpu\_remaining\_too\_low\_id | id for monitor virtualmachine_credit_cpu_remaining_too_low | -| virtualmachine\_free\_filesystem\_disk\_space\_low\_id | id for monitor virtualmachine_free_filesystem_disk_space_low | +| virtualmachine\_free\_disk\_space\_low\_id | id for monitor virtualmachine_free_disk_space_low | | virtualmachine\_ram\_reserved\_id | id for monitor virtualmachine_ram_reserved | | virtualmachine\_status\_id | id for monitor virtualmachine_status | diff --git a/cloud/azure/virtual-machine/outputs.tf b/cloud/azure/virtual-machine/outputs.tf index 4867671..542b43d 100644 --- a/cloud/azure/virtual-machine/outputs.tf +++ b/cloud/azure/virtual-machine/outputs.tf @@ -18,8 +18,8 @@ output "virtualmachine_ram_reserved_id" { value = datadog_monitor.virtualmachine_ram_reserved.*.id } -output "virtualmachine_free_filesystem_disk_space_low_id" { - description = "id for monitor virtualmachine_free_filesystem_disk_space_low" - value = datadog_monitor.virtualmachine_free_filesystem_disk_space_low.*.id +output "virtualmachine_free_disk_space_low_id" { + description = "id for monitor virtualmachine_free_disk_space_low" + value = datadog_monitor.virtualmachine_free_disk_space_low.*.id } From 689ed65dd193a7fae90acf4bc6e9b7f96f6b568d Mon Sep 17 00:00:00 2001 From: "gauthier.ampe@fr.clara.net" Date: Tue, 6 Aug 2019 10:47:12 +0200 Subject: [PATCH 5/8] MON-489 use greater logic instead of lower --- cloud/azure/virtual-machine/inputs.tf | 18 ++++++++--------- .../monitors-virtual-machine.tf | 20 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/cloud/azure/virtual-machine/inputs.tf b/cloud/azure/virtual-machine/inputs.tf index 8072d8d..6b2d91d 100644 --- a/cloud/azure/virtual-machine/inputs.tf +++ b/cloud/azure/virtual-machine/inputs.tf @@ -191,41 +191,41 @@ variable "ram_reserved_threshold_critical" { default = 95 } -variable "free_disk_space_low_enabled" { +variable "disk_space_enabled" { description = "Flag to enable Virtual Machine status monitor" type = string default = "true" } -variable "free_disk_space_low_time_aggregator" { +variable "disk_space_time_aggregator" { description = "Monitor aggregator for Virtual Machine free disk space [available values: min, max or avg]" type = string default = "avg" } -variable "free_disk_space_low_timeframe" { +variable "disk_space_timeframe" { description = "Monitor timeframe for Virtual Machine free disk space too low [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_disk_space_low_threshold_critical" { +variable "disk_space_threshold_critical" { description = "Virtual Machine free disk space in percent (critical threshold)" - default = "5" + default = "95" } -variable "free_disk_space_low_threshold_warning" { +variable "disk_space_threshold_warning" { description = "Virtual Machine free disk space in percent (warning threshold)" - default = "10" + default = "90" } -variable "free_disk_space_low_extra_tags" { +variable "disk_space_extra_tags" { description = "Extra tags for Virtual Machine free disk space monitor" type = list(string) default = [] } -variable "free_disk_space_low_message" { +variable "disk_space_message" { description = "Custom message for Virtual Machine CPU free disk space monitor" type = string default = "" diff --git a/cloud/azure/virtual-machine/monitors-virtual-machine.tf b/cloud/azure/virtual-machine/monitors-virtual-machine.tf index 5e77413..78774af 100644 --- a/cloud/azure/virtual-machine/monitors-virtual-machine.tf +++ b/cloud/azure/virtual-machine/monitors-virtual-machine.tf @@ -134,21 +134,21 @@ EOQ } } -resource "datadog_monitor" "virtualmachine_free_disk_space_low" { - count = var.free_disk_space_low_enabled == "true" ? 1 : 0 - name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Virtual Machine disk space too low {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" - message = coalesce(var.free_disk_space_low_message, var.message) +resource "datadog_monitor" "virtualmachine_disk_space" { + count = var.disk_space_enabled == "true" ? 1 : 0 + name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Virtual Machine disk space {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" + message = coalesce(var.disk_space_message, var.message) type = "query alert" query = < ${var.disk_space_threshold_critical} EOQ thresholds = { - warning = var.free_disk_space_low_threshold_warning - critical = var.free_disk_space_low_threshold_critical + warning = var.disk_space_threshold_warning + critical = var.disk_space_threshold_critical } evaluation_delay = var.evaluation_delay @@ -161,7 +161,7 @@ EOQ locked = false require_full_window = false - tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:virtualmachine", "team:claranet", "created-by:terraform"], var.free_disk_space_low_extra_tags) + tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:virtualmachine", "team:claranet", "created-by:terraform"], var.disk_space_extra_tags) lifecycle { ignore_changes = ["silenced"] From 25579182ddd3da85458745a3a25595ea47d362c7 Mon Sep 17 00:00:00 2001 From: "gauthier.ampe@fr.clara.net" Date: Tue, 6 Aug 2019 10:50:22 +0200 Subject: [PATCH 6/8] MON-489 Auto Update --- cloud/azure/virtual-machine/README.md | 18 +++++++++--------- cloud/azure/virtual-machine/outputs.tf | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cloud/azure/virtual-machine/README.md b/cloud/azure/virtual-machine/README.md index 0155d0e..cea43c3 100644 --- a/cloud/azure/virtual-machine/README.md +++ b/cloud/azure/virtual-machine/README.md @@ -18,7 +18,7 @@ Creates DataDog monitors with the following checks: - Virtual Machine CPU usage - Virtual Machine credit CPU -- Virtual Machine disk space too low +- Virtual Machine disk space - Virtual Machine is unreachable - Virtual Machine RAM reserved @@ -40,18 +40,18 @@ Creates DataDog monitors with the following checks: | cpu\_usage\_threshold\_warning | Virtual Machine CPU usage in percent (warning threshold) | string | `"80"` | no | | cpu\_usage\_time\_aggregator | Monitor aggregator for Virtual Machine CPU [available values: min, max or avg] | string | `"min"` | no | | cpu\_usage\_timeframe | Monitor timeframe for Virtual Machine CPU [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_15m"` | no | +| disk\_space\_enabled | Flag to enable Virtual Machine status monitor | string | `"true"` | no | +| disk\_space\_extra\_tags | Extra tags for Virtual Machine free disk space monitor | list(string) | `[]` | no | +| disk\_space\_message | Custom message for Virtual Machine CPU free disk space monitor | string | `""` | no | +| disk\_space\_threshold\_critical | Virtual Machine free disk space in percent (critical threshold) | string | `"95"` | no | +| disk\_space\_threshold\_warning | Virtual Machine free disk space in percent (warning threshold) | string | `"90"` | no | +| disk\_space\_time\_aggregator | Monitor aggregator for Virtual Machine free disk space [available values: min, max or avg] | string | `"avg"` | no | +| disk\_space\_timeframe | Monitor timeframe for Virtual Machine free disk space too low [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_15m"` | no | | environment | Architecture environment | string | n/a | 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\_custom\_excluded | Tags excluded 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\_disk\_space\_low\_enabled | Flag to enable Virtual Machine status monitor | string | `"true"` | no | -| free\_disk\_space\_low\_extra\_tags | Extra tags for Virtual Machine free disk space monitor | list(string) | `[]` | no | -| free\_disk\_space\_low\_message | Custom message for Virtual Machine CPU free disk space monitor | string | `""` | no | -| free\_disk\_space\_low\_threshold\_critical | Virtual Machine free disk space in percent (critical threshold) | string | `"5"` | no | -| free\_disk\_space\_low\_threshold\_warning | Virtual Machine free disk space in percent (warning threshold) | string | `"10"` | no | -| free\_disk\_space\_low\_time\_aggregator | Monitor aggregator for Virtual Machine free disk space [available values: min, max or avg] | string | `"avg"` | no | -| free\_disk\_space\_low\_timeframe | Monitor timeframe for Virtual Machine free disk space too low [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 | n/a | yes | | new\_host\_delay | Delay in seconds before monitor new resource | string | `"300"` | no | | prefix\_slug | Prefix string to prepend between brackets on every monitors names | string | `""` | no | @@ -74,7 +74,7 @@ Creates DataDog monitors with the following checks: |------|-------------| | virtualmachine\_cpu\_usage\_id | id for monitor virtualmachine_cpu_usage | | virtualmachine\_credit\_cpu\_remaining\_too\_low\_id | id for monitor virtualmachine_credit_cpu_remaining_too_low | -| virtualmachine\_free\_disk\_space\_low\_id | id for monitor virtualmachine_free_disk_space_low | +| virtualmachine\_disk\_space\_id | id for monitor virtualmachine_disk_space | | virtualmachine\_ram\_reserved\_id | id for monitor virtualmachine_ram_reserved | | virtualmachine\_status\_id | id for monitor virtualmachine_status | diff --git a/cloud/azure/virtual-machine/outputs.tf b/cloud/azure/virtual-machine/outputs.tf index 542b43d..dd5af9a 100644 --- a/cloud/azure/virtual-machine/outputs.tf +++ b/cloud/azure/virtual-machine/outputs.tf @@ -18,8 +18,8 @@ output "virtualmachine_ram_reserved_id" { value = datadog_monitor.virtualmachine_ram_reserved.*.id } -output "virtualmachine_free_disk_space_low_id" { - description = "id for monitor virtualmachine_free_disk_space_low" - value = datadog_monitor.virtualmachine_free_disk_space_low.*.id +output "virtualmachine_disk_space_id" { + description = "id for monitor virtualmachine_disk_space" + value = datadog_monitor.virtualmachine_disk_space.*.id } From c0fe4bf1da15d67a5cd43cc72f43685a7636c86d Mon Sep 17 00:00:00 2001 From: "gauthier.ampe@fr.clara.net" Date: Tue, 6 Aug 2019 16:39:32 +0200 Subject: [PATCH 7/8] MON-489 Change aggregator and timeframe --- cloud/azure/virtual-machine/inputs.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud/azure/virtual-machine/inputs.tf b/cloud/azure/virtual-machine/inputs.tf index 6b2d91d..713330c 100644 --- a/cloud/azure/virtual-machine/inputs.tf +++ b/cloud/azure/virtual-machine/inputs.tf @@ -200,13 +200,13 @@ variable "disk_space_enabled" { variable "disk_space_time_aggregator" { description = "Monitor aggregator for Virtual Machine free disk space [available values: min, max or avg]" type = string - default = "avg" + default = "max" } variable "disk_space_timeframe" { description = "Monitor timeframe for Virtual Machine free disk space too low [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = string - default = "last_15m" + default = "last_5m" } variable "disk_space_threshold_critical" { From b886a58426af5272d2143ef52fbd36ea45c68694 Mon Sep 17 00:00:00 2001 From: "gauthier.ampe@fr.clara.net" Date: Tue, 6 Aug 2019 16:42:10 +0200 Subject: [PATCH 8/8] MON-489 Auto Update --- cloud/azure/virtual-machine/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud/azure/virtual-machine/README.md b/cloud/azure/virtual-machine/README.md index cea43c3..3f38900 100644 --- a/cloud/azure/virtual-machine/README.md +++ b/cloud/azure/virtual-machine/README.md @@ -45,8 +45,8 @@ Creates DataDog monitors with the following checks: | disk\_space\_message | Custom message for Virtual Machine CPU free disk space monitor | string | `""` | no | | disk\_space\_threshold\_critical | Virtual Machine free disk space in percent (critical threshold) | string | `"95"` | no | | disk\_space\_threshold\_warning | Virtual Machine free disk space in percent (warning threshold) | string | `"90"` | no | -| disk\_space\_time\_aggregator | Monitor aggregator for Virtual Machine free disk space [available values: min, max or avg] | string | `"avg"` | no | -| disk\_space\_timeframe | Monitor timeframe for Virtual Machine free disk space too low [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_15m"` | no | +| disk\_space\_time\_aggregator | Monitor aggregator for Virtual Machine free disk space [available values: min, max or avg] | string | `"max"` | no | +| disk\_space\_timeframe | Monitor timeframe for Virtual Machine free disk space too low [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no | | environment | Architecture environment | string | n/a | 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 |