From 60a449f1d71e4b114fb267d36f8cb5b956a54023 Mon Sep 17 00:00:00 2001 From: Rafael Romero Carmona Date: Thu, 2 Aug 2018 11:00:00 +0200 Subject: [PATCH 01/10] MON-281 Disk forecast first version --- system/generic/README.md | 14 +++++++ system/generic/inputs.tf | 70 +++++++++++++++++++++++++++++++ system/generic/monitors-system.tf | 39 +++++++++++++++++ system/generic/outputs.tf | 5 +++ 4 files changed, 128 insertions(+) diff --git a/system/generic/README.md b/system/generic/README.md index 150891a..739d839 100644 --- a/system/generic/README.md +++ b/system/generic/README.md @@ -19,6 +19,7 @@ Creates DataDog monitors with the following checks: - CPU usage - CPU load 5 - Free disk space +- Disk Space could reach - Free disk inodes - Free memory @@ -51,6 +52,18 @@ Creates DataDog monitors with the following checks: | free_disk_inodes_threshold_warning | Free disk space warning threshold | string | `10` | no | | free_disk_inodes_time_aggregator | Monitor aggregator for Free disk inodes [available values: min, max or avg] | string | `min` | no | | free_disk_inodes_timeframe | Monitor timeframe for Free disk inodes [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| free_disk_space_forecast_algorithm | Algorithm for the Free diskspace Forecast monitor | string | `linear` | no | +| free_disk_space_forecast_deviations | Deviations for the Free diskspace Forecast monitor | string | `1` | no | +| free_disk_space_forecast_interval | Interval for the Free diskspace Forecast monitor | string | `60m` | no | +| free_disk_space_forecast_linear_history | History for the Free diskspace Forecast monitor | string | `1w` | no | +| free_disk_space_forecast_linear_model | Model for the Free diskspace Forecast monitor | string | `default` | no | +| free_disk_space_forecast_message | Custom message for Free diskspace monitor | string | `` | no | +| free_disk_space_forecast_seasonal_seasonality | Seasonality for the Free diskspace Forecast monitor | string | `weekly` | no | +| free_disk_space_forecast_silenced | Groups to mute for Free diskspace monitor | map | `` | no | +| free_disk_space_forecast_threshold_critical | Free disk space critical threshold | string | `80` | no | +| free_disk_space_forecast_threshold_critical_recovery | Free disk space warning threshold | string | `72` | no | +| free_disk_space_forecast_time_aggregator | Monitor aggregator for Free diskspace [available values: min, max or avg] | string | `max` | no | +| free_disk_space_forecast_timeframe | Monitor timeframe for Free diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `next_1w` | no | | free_disk_space_extra_tags | Extra tags for Free diskspace monitor | list | `` | no | | free_disk_space_message | Custom message for Free diskspace monitor | string | `` | no | | free_disk_space_silenced | Groups to mute for Free diskspace monitor | map | `` | no | @@ -73,6 +86,7 @@ Creates DataDog monitors with the following checks: | Name | Description | |------|-------------| | datadog_cpu_too_high_id | id for monitor datadog_cpu_too_high | +| datadog_free_disk_space_forecast_id | id for monitor datadog_free_disk_space_forecast | | datadog_free_disk_space_inodes_too_low_id | id for monitor datadog_free_disk_space_inodes_too_low | | datadog_free_disk_space_too_low_id | id for monitor datadog_free_disk_space_too_low | | datadog_free_memory_id | id for monitor datadog_free_memory | diff --git a/system/generic/inputs.tf b/system/generic/inputs.tf index 7405b07..c2aac7e 100644 --- a/system/generic/inputs.tf +++ b/system/generic/inputs.tf @@ -151,6 +151,76 @@ variable "free_disk_space_threshold_critical" { default = 10 } +variable "free_disk_space_forecast_silenced" { + description = "Groups to mute for Free diskspace monitor" + type = "map" + default = {} +} + +variable "free_disk_space_forecast_message" { + description = "Custom message for Free diskspace monitor" + type = "string" + default = "" +} + +variable "free_disk_space_forecast_time_aggregator" { + description = "Monitor aggregator for Free diskspace [available values: min, max or avg]" + type = "string" + default = "max" +} + +variable "free_disk_space_forecast_timeframe" { + description = "Monitor timeframe for Free diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + type = "string" + default = "next_1w" +} + +variable "free_disk_space_forecast_algorithm" { + description = "Algorithm for the Free diskspace Forecast monitor" + type = "string" + default = "linear" +} + +variable "free_disk_space_forecast_deviations" { + description = "Deviations for the Free diskspace Forecast monitor" + type = "string" + default = 1 +} + +variable "free_disk_space_forecast_interval" { + description = "Interval for the Free diskspace Forecast monitor" + type = "string" + default = "60m" +} + +variable "free_disk_space_forecast_linear_history" { + description = "History for the Free diskspace Forecast monitor" + type = "string" + default = "1w" +} + +variable "free_disk_space_forecast_linear_model" { + description = "Model for the Free diskspace Forecast monitor" + type = "string" + default = "default" +} + +variable "free_disk_space_forecast_seasonal_seasonality" { + description = "Seasonality for the Free diskspace Forecast monitor" + type = "string" + default = "weekly" +} + +variable "free_disk_space_forecast_threshold_critical_recovery" { + description = "Free disk space warning threshold" + default = 72 +} + +variable "free_disk_space_forecast_threshold_critical" { + description = "Free disk space critical threshold" + default = 80 +} + variable "free_disk_inodes_silenced" { description = "Groups to mute for Free disk inodes monitor" type = "map" diff --git a/system/generic/monitors-system.tf b/system/generic/monitors-system.tf index 4d0374b..f23a6e9 100644 --- a/system/generic/monitors-system.tf +++ b/system/generic/monitors-system.tf @@ -93,6 +93,45 @@ resource "datadog_monitor" "datadog_free_disk_space_too_low" { tags = ["env:${var.environment}", "type:system", "provider:disk", "resource:generic", "team:claranet", "created-by:terraform", "${var.free_disk_space_extra_tags}"] } +resource "datadog_monitor" "datadog_free_disk_space_forecast" { + name = "[${var.environment}] Disk Space could reach {{#is_alert}}{{threshold}}%{{/is_alert}} in a near future" + message = "${coalesce(var.free_disk_space_forecast_message, var.message)}" + + query = <= ${var.free_disk_space_forecast_threshold_critical} + EOF + + type = "query alert" + + thresholds { + critical_recovery = "${var.free_disk_space_forecast_threshold_critical_recovery}" + critical = "${var.free_disk_space_forecast_threshold_critical}" + } + + tags = ["env:${var.environment}", "type:system", "resource:disk"] + + notify_audit = false + locked = false + timeout_h = 0 + include_tags = true + require_full_window = false + notify_no_data = false + renotify_interval = 0 + + evaluation_delay = "${var.delay}" + new_host_delay = "${var.delay}" + + silenced = "${var.free_disk_space_forecast_silenced}" +} + resource "datadog_monitor" "datadog_free_disk_space_inodes_too_low" { name = "[${var.environment}] Free disk inodes {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.free_disk_inodes_message, var.message)}" diff --git a/system/generic/outputs.tf b/system/generic/outputs.tf index daf231f..85492d8 100644 --- a/system/generic/outputs.tf +++ b/system/generic/outputs.tf @@ -13,6 +13,11 @@ output "datadog_free_disk_space_too_low_id" { value = "${datadog_monitor.datadog_free_disk_space_too_low.id}" } +output "datadog_free_disk_space_forecast_id" { + description = "id for monitor datadog_free_disk_space_forecast" + value = "${datadog_monitor.datadog_free_disk_space_forecast.id}" +} + output "datadog_free_disk_space_inodes_too_low_id" { description = "id for monitor datadog_free_disk_space_inodes_too_low" value = "${datadog_monitor.datadog_free_disk_space_inodes_too_low.id}" From 7098781a7d345d0b9824c81e423406c98d2afa47 Mon Sep 17 00:00:00 2001 From: Rafael Romero Carmona Date: Fri, 10 Aug 2018 16:42:40 +0200 Subject: [PATCH 02/10] MON-281 Require full window for the forecast monitor --- system/generic/monitors-system.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/generic/monitors-system.tf b/system/generic/monitors-system.tf index f23a6e9..3598575 100644 --- a/system/generic/monitors-system.tf +++ b/system/generic/monitors-system.tf @@ -122,7 +122,7 @@ resource "datadog_monitor" "datadog_free_disk_space_forecast" { locked = false timeout_h = 0 include_tags = true - require_full_window = false + require_full_window = true notify_no_data = false renotify_interval = 0 From 13089676cb351d2bc92a328c418ded711d2d41cb Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Tue, 21 Aug 2018 14:01:11 +0200 Subject: [PATCH 03/10] MON-281 update readme --- system/generic/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/generic/README.md b/system/generic/README.md index 739d839..7635a50 100644 --- a/system/generic/README.md +++ b/system/generic/README.md @@ -52,6 +52,7 @@ Creates DataDog monitors with the following checks: | free_disk_inodes_threshold_warning | Free disk space warning threshold | string | `10` | no | | free_disk_inodes_time_aggregator | Monitor aggregator for Free disk inodes [available values: min, max or avg] | string | `min` | no | | free_disk_inodes_timeframe | Monitor timeframe for Free disk inodes [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | +| free_disk_space_extra_tags | Extra tags for Free diskspace monitor | list | `` | no | | free_disk_space_forecast_algorithm | Algorithm for the Free diskspace Forecast monitor | string | `linear` | no | | free_disk_space_forecast_deviations | Deviations for the Free diskspace Forecast monitor | string | `1` | no | | free_disk_space_forecast_interval | Interval for the Free diskspace Forecast monitor | string | `60m` | no | @@ -64,7 +65,6 @@ Creates DataDog monitors with the following checks: | free_disk_space_forecast_threshold_critical_recovery | Free disk space warning threshold | string | `72` | no | | free_disk_space_forecast_time_aggregator | Monitor aggregator for Free diskspace [available values: min, max or avg] | string | `max` | no | | free_disk_space_forecast_timeframe | Monitor timeframe for Free diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `next_1w` | no | -| free_disk_space_extra_tags | Extra tags for Free diskspace monitor | list | `` | no | | free_disk_space_message | Custom message for Free diskspace monitor | string | `` | no | | free_disk_space_silenced | Groups to mute for Free diskspace monitor | map | `` | no | | free_disk_space_threshold_critical | Free disk space critical threshold | string | `10` | no | From f603d936e7d3be7f9a65d1ec81b6f3c4821b02c9 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Tue, 21 Aug 2018 14:03:34 +0200 Subject: [PATCH 04/10] MON-281 update using new filter tags module --- system/generic/monitors-system.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/generic/monitors-system.tf b/system/generic/monitors-system.tf index 3598575..da08499 100644 --- a/system/generic/monitors-system.tf +++ b/system/generic/monitors-system.tf @@ -99,7 +99,7 @@ resource "datadog_monitor" "datadog_free_disk_space_forecast" { query = < Date: Tue, 21 Aug 2018 14:04:53 +0200 Subject: [PATCH 05/10] MON-281 split delay variable --- system/generic/monitors-system.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/generic/monitors-system.tf b/system/generic/monitors-system.tf index da08499..3edf4de 100644 --- a/system/generic/monitors-system.tf +++ b/system/generic/monitors-system.tf @@ -126,8 +126,8 @@ resource "datadog_monitor" "datadog_free_disk_space_forecast" { notify_no_data = false renotify_interval = 0 - evaluation_delay = "${var.delay}" - new_host_delay = "${var.delay}" + evaluation_delay = "${var.evaluation_delay}" + new_host_delay = "${var.new_host_delay}" silenced = "${var.free_disk_space_forecast_silenced}" } From 5c6e78c1f29f1123c761ff6a82bfbeb9982393bd Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Tue, 21 Aug 2018 14:09:09 +0200 Subject: [PATCH 06/10] MON-281 update tags and add extra tags --- system/generic/README.md | 13 +++++++------ system/generic/inputs.tf | 18 ++++++++++++------ system/generic/monitors-system.tf | 4 ++-- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/system/generic/README.md b/system/generic/README.md index 7635a50..e899b69 100644 --- a/system/generic/README.md +++ b/system/generic/README.md @@ -55,16 +55,17 @@ Creates DataDog monitors with the following checks: | free_disk_space_extra_tags | Extra tags for Free diskspace monitor | list | `` | no | | free_disk_space_forecast_algorithm | Algorithm for the Free diskspace Forecast monitor | string | `linear` | no | | free_disk_space_forecast_deviations | Deviations for the Free diskspace Forecast monitor | string | `1` | no | +| free_disk_space_forecast_extra_tags | Extra tags for Free diskspace forecast monitor | list | `` | no | | free_disk_space_forecast_interval | Interval for the Free diskspace Forecast monitor | string | `60m` | no | | free_disk_space_forecast_linear_history | History for the Free diskspace Forecast monitor | string | `1w` | no | | free_disk_space_forecast_linear_model | Model for the Free diskspace Forecast monitor | string | `default` | no | -| free_disk_space_forecast_message | Custom message for Free diskspace monitor | string | `` | no | +| free_disk_space_forecast_message | Custom message for Free diskspace forecast monitor | string | `` | no | | free_disk_space_forecast_seasonal_seasonality | Seasonality for the Free diskspace Forecast monitor | string | `weekly` | no | -| free_disk_space_forecast_silenced | Groups to mute for Free diskspace monitor | map | `` | no | -| free_disk_space_forecast_threshold_critical | Free disk space critical threshold | string | `80` | no | -| free_disk_space_forecast_threshold_critical_recovery | Free disk space warning threshold | string | `72` | no | -| free_disk_space_forecast_time_aggregator | Monitor aggregator for Free diskspace [available values: min, max or avg] | string | `max` | no | -| free_disk_space_forecast_timeframe | Monitor timeframe for Free diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `next_1w` | no | +| free_disk_space_forecast_silenced | Groups to mute for Free diskspace forecast monitor | map | `` | no | +| free_disk_space_forecast_threshold_critical | Free disk space forecast critical threshold | string | `80` | no | +| free_disk_space_forecast_threshold_critical_recovery | Free disk space forecast recovery threshold | string | `72` | no | +| free_disk_space_forecast_time_aggregator | Monitor aggregator for Free diskspace forecast [available values: min, max or avg] | string | `max` | no | +| free_disk_space_forecast_timeframe | Monitor timeframe for Free diskspace forecast [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `next_1w` | no | | free_disk_space_message | Custom message for Free diskspace monitor | string | `` | no | | free_disk_space_silenced | Groups to mute for Free diskspace monitor | map | `` | no | | free_disk_space_threshold_critical | Free disk space critical threshold | string | `10` | no | diff --git a/system/generic/inputs.tf b/system/generic/inputs.tf index c2aac7e..991d15f 100644 --- a/system/generic/inputs.tf +++ b/system/generic/inputs.tf @@ -152,25 +152,31 @@ variable "free_disk_space_threshold_critical" { } variable "free_disk_space_forecast_silenced" { - description = "Groups to mute for Free diskspace monitor" + description = "Groups to mute for Free diskspace forecast monitor" type = "map" default = {} } +variable "free_disk_space_forecast_extra_tags" { + description = "Extra tags for Free diskspace forecast monitor" + type = "list" + default = [] +} + variable "free_disk_space_forecast_message" { - description = "Custom message for Free diskspace monitor" + description = "Custom message for Free diskspace forecast monitor" type = "string" default = "" } variable "free_disk_space_forecast_time_aggregator" { - description = "Monitor aggregator for Free diskspace [available values: min, max or avg]" + description = "Monitor aggregator for Free diskspace forecast [available values: min, max or avg]" type = "string" default = "max" } variable "free_disk_space_forecast_timeframe" { - description = "Monitor timeframe for Free diskspace [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + description = "Monitor timeframe for Free diskspace forecast [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" type = "string" default = "next_1w" } @@ -212,12 +218,12 @@ variable "free_disk_space_forecast_seasonal_seasonality" { } variable "free_disk_space_forecast_threshold_critical_recovery" { - description = "Free disk space warning threshold" + description = "Free disk space forecast recovery threshold" default = 72 } variable "free_disk_space_forecast_threshold_critical" { - description = "Free disk space critical threshold" + description = "Free disk space forecast critical threshold" default = 80 } diff --git a/system/generic/monitors-system.tf b/system/generic/monitors-system.tf index 3edf4de..89db0c4 100644 --- a/system/generic/monitors-system.tf +++ b/system/generic/monitors-system.tf @@ -116,8 +116,6 @@ resource "datadog_monitor" "datadog_free_disk_space_forecast" { critical = "${var.free_disk_space_forecast_threshold_critical}" } - tags = ["env:${var.environment}", "type:system", "resource:disk"] - notify_audit = false locked = false timeout_h = 0 @@ -130,6 +128,8 @@ resource "datadog_monitor" "datadog_free_disk_space_forecast" { new_host_delay = "${var.new_host_delay}" silenced = "${var.free_disk_space_forecast_silenced}" + + tags = ["env:${var.environment}", "type:system", "provider:disk", "resource:generic", "team:claranet", "created-by:terraform", "${var.free_disk_space_forecast_extra_tags}"] } resource "datadog_monitor" "datadog_free_disk_space_inodes_too_low" { From e238052c82ce784b0c404f07505b1c912500e681 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Tue, 21 Aug 2018 15:06:45 +0200 Subject: [PATCH 07/10] MON-281 update description to get relevant information --- system/generic/inputs.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/system/generic/inputs.tf b/system/generic/inputs.tf index 991d15f..87b1bd8 100644 --- a/system/generic/inputs.tf +++ b/system/generic/inputs.tf @@ -176,37 +176,37 @@ variable "free_disk_space_forecast_time_aggregator" { } variable "free_disk_space_forecast_timeframe" { - description = "Monitor timeframe for Free diskspace forecast [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + description = "Monitor timeframe for Free diskspace forecast [available values: `next_12h`, `next_#d` (1, 2, or 3), `next_#w` (1 or 2) or `next_#mo` (1, 2 or 3)]" type = "string" default = "next_1w" } variable "free_disk_space_forecast_algorithm" { - description = "Algorithm for the Free diskspace Forecast monitor" + description = "Algorithm for the Free diskspace Forecast monitor [available values: `linear` or `seasonal`]" type = "string" default = "linear" } variable "free_disk_space_forecast_deviations" { - description = "Deviations for the Free diskspace Forecast monitor" + description = "Deviations for the Free diskspace Forecast monitor [available values: `1`, `2`, `3`, `4` or `5`]" type = "string" default = 1 } variable "free_disk_space_forecast_interval" { - description = "Interval for the Free diskspace Forecast monitor" + description = "Interval for the Free diskspace Forecast monitor [available values: `30m`, `60m` or `120m`]" type = "string" default = "60m" } variable "free_disk_space_forecast_linear_history" { - description = "History for the Free diskspace Forecast monitor" + description = "History for the Free diskspace Forecast monitor [available values: `12h`, `#d` (1, 2, or 3), `#w` (1, or 2) or `#mo` (1, 2 or 3)]" type = "string" default = "1w" } variable "free_disk_space_forecast_linear_model" { - description = "Model for the Free diskspace Forecast monitor" + description = "Model for the Free diskspace Forecast monitor [available values: `default`, `simple` or `reactive`]" type = "string" default = "default" } From c99cdb483eeeb544d907bcaa4e6f40cb5be91237 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Tue, 21 Aug 2018 15:09:03 +0200 Subject: [PATCH 08/10] MON-281 update readme --- system/generic/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/system/generic/README.md b/system/generic/README.md index e899b69..833596e 100644 --- a/system/generic/README.md +++ b/system/generic/README.md @@ -53,19 +53,19 @@ Creates DataDog monitors with the following checks: | free_disk_inodes_time_aggregator | Monitor aggregator for Free disk inodes [available values: min, max or avg] | string | `min` | no | | free_disk_inodes_timeframe | Monitor timeframe for Free disk inodes [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | free_disk_space_extra_tags | Extra tags for Free diskspace monitor | list | `` | no | -| free_disk_space_forecast_algorithm | Algorithm for the Free diskspace Forecast monitor | string | `linear` | no | -| free_disk_space_forecast_deviations | Deviations for the Free diskspace Forecast monitor | string | `1` | no | +| free_disk_space_forecast_algorithm | Algorithm for the Free diskspace Forecast monitor [available values: `linear` or `seasonal`] | string | `linear` | no | +| free_disk_space_forecast_deviations | Deviations for the Free diskspace Forecast monitor [available values: `1`, `2`, `3`, `4` or `5`] | string | `1` | no | | free_disk_space_forecast_extra_tags | Extra tags for Free diskspace forecast monitor | list | `` | no | -| free_disk_space_forecast_interval | Interval for the Free diskspace Forecast monitor | string | `60m` | no | -| free_disk_space_forecast_linear_history | History for the Free diskspace Forecast monitor | string | `1w` | no | -| free_disk_space_forecast_linear_model | Model for the Free diskspace Forecast monitor | string | `default` | no | +| free_disk_space_forecast_interval | Interval for the Free diskspace Forecast monitor [available values: `30m`, `60m` or `120m`] | string | `60m` | no | +| free_disk_space_forecast_linear_history | History for the Free diskspace Forecast monitor [available values: `12h`, `#d` (1, 2, or 3), `#w` (1, or 2) or `#mo` (1, 2 or 3)] | string | `1w` | no | +| free_disk_space_forecast_linear_model | Model for the Free diskspace Forecast monitor [available values: `default`, `simple` or `reactive`] | string | `default` | no | | free_disk_space_forecast_message | Custom message for Free diskspace forecast monitor | string | `` | no | | free_disk_space_forecast_seasonal_seasonality | Seasonality for the Free diskspace Forecast monitor | string | `weekly` | no | | free_disk_space_forecast_silenced | Groups to mute for Free diskspace forecast monitor | map | `` | no | | free_disk_space_forecast_threshold_critical | Free disk space forecast critical threshold | string | `80` | no | | free_disk_space_forecast_threshold_critical_recovery | Free disk space forecast recovery threshold | string | `72` | no | | free_disk_space_forecast_time_aggregator | Monitor aggregator for Free diskspace forecast [available values: min, max or avg] | string | `max` | no | -| free_disk_space_forecast_timeframe | Monitor timeframe for Free diskspace forecast [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `next_1w` | no | +| free_disk_space_forecast_timeframe | Monitor timeframe for Free diskspace forecast [available values: `next_12h`, `next_#d` (1, 2, or 3), `next_#w` (1 or 2) or `next_#mo` (1, 2 or 3)] | string | `next_1w` | no | | free_disk_space_message | Custom message for Free diskspace monitor | string | `` | no | | free_disk_space_silenced | Groups to mute for Free diskspace monitor | map | `` | no | | free_disk_space_threshold_critical | Free disk space critical threshold | string | `10` | no | From f4410676f1758d73eaff5204d5eb972e49b8560e Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Tue, 21 Aug 2018 15:11:30 +0200 Subject: [PATCH 09/10] MON-281 automatically handle forecast monitor from could reach pattern --- scripts/02_update_readme.sh | 2 +- system/generic/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/02_update_readme.sh b/scripts/02_update_readme.sh index 1c88a3b..56db16b 100755 --- a/scripts/02_update_readme.sh +++ b/scripts/02_update_readme.sh @@ -55,7 +55,7 @@ EOF IFS=$(echo -en "\n\b") for match in $(grep -E ^[[:space:]]+name[[:space:]]+= $(basename ${path})); do name=$(get_name "${match}") - echo "- $name" >> README.md + echo "- ${name/could reach/forecast}" >> README.md done IFS=$SAVEIFS terraform-docs md ./ >> README.md diff --git a/system/generic/README.md b/system/generic/README.md index 833596e..b3b450c 100644 --- a/system/generic/README.md +++ b/system/generic/README.md @@ -19,7 +19,7 @@ Creates DataDog monitors with the following checks: - CPU usage - CPU load 5 - Free disk space -- Disk Space could reach +- Disk Space forecast - Free disk inodes - Free memory From a444536c0f84c686270311a32305e0f12f1c3dd4 Mon Sep 17 00:00:00 2001 From: Quentin Manfroi Date: Wed, 22 Aug 2018 10:44:51 +0200 Subject: [PATCH 10/10] MON-281 remove extra space --- system/generic/README.md | 2 +- system/generic/inputs.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/generic/README.md b/system/generic/README.md index b3b450c..5ab7477 100644 --- a/system/generic/README.md +++ b/system/generic/README.md @@ -61,7 +61,7 @@ Creates DataDog monitors with the following checks: | free_disk_space_forecast_linear_model | Model for the Free diskspace Forecast monitor [available values: `default`, `simple` or `reactive`] | string | `default` | no | | free_disk_space_forecast_message | Custom message for Free diskspace forecast monitor | string | `` | no | | free_disk_space_forecast_seasonal_seasonality | Seasonality for the Free diskspace Forecast monitor | string | `weekly` | no | -| free_disk_space_forecast_silenced | Groups to mute for Free diskspace forecast monitor | map | `` | no | +| free_disk_space_forecast_silenced | Groups to mute for Free diskspace forecast monitor | map | `` | no | | free_disk_space_forecast_threshold_critical | Free disk space forecast critical threshold | string | `80` | no | | free_disk_space_forecast_threshold_critical_recovery | Free disk space forecast recovery threshold | string | `72` | no | | free_disk_space_forecast_time_aggregator | Monitor aggregator for Free diskspace forecast [available values: min, max or avg] | string | `max` | no | diff --git a/system/generic/inputs.tf b/system/generic/inputs.tf index 87b1bd8..8575ed1 100644 --- a/system/generic/inputs.tf +++ b/system/generic/inputs.tf @@ -152,7 +152,7 @@ variable "free_disk_space_threshold_critical" { } variable "free_disk_space_forecast_silenced" { - description = "Groups to mute for Free diskspace forecast monitor" + description = "Groups to mute for Free diskspace forecast monitor" type = "map" default = {} }