diff --git a/cloud/azure/apimanagement/README.md b/cloud/azure/apimanagement/README.md index f08ce97..aa1ec85 100644 --- a/cloud/azure/apimanagement/README.md +++ b/cloud/azure/apimanagement/README.md @@ -33,6 +33,7 @@ Inputs | failed_requests_silenced | Groups to mute for API Management failed requests monitor | map | `` | no | | failed_requests_threshold_critical | Maximum acceptable percent of failed requests | string | `90` | no | | failed_requests_threshold_warning | Warning regarding acceptable percent of failed requests | string | `50` | no | +| failed_requests_timeframe | Monitor timeframe for API Management failed requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | 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 | | message | Message sent when a Redis monitor is triggered | string | - | yes | @@ -40,16 +41,20 @@ Inputs | other_requests_silenced | Groups to mute for API Management other requests monitor | map | `` | no | | other_requests_threshold_critical | Maximum acceptable percent of other requests | string | `90` | no | | other_requests_threshold_warning | Warning regarding acceptable percent of other requests | string | `50` | no | +| other_requests_timeframe | Monitor timeframe for API Management other requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | status_message | Custom message for API Management status monitor | string | `` | no | | status_silenced | Groups to mute for API Management status monitor | map | `` | no | +| status_timeframe | Monitor timeframe for API Management status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | successful_requests_message | Custom message for API Management successful requests monitor | string | `` | no | | successful_requests_silenced | Groups to mute for API Management successful requests monitor | map | `` | no | | successful_requests_threshold_critical | Minimum acceptable percent of successful requests | string | `10` | no | | successful_requests_threshold_warning | Warning regarding acceptable percent of successful requests | string | `30` | no | +| successful_requests_timeframe | Monitor timeframe for API Management successful requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | unauthorized_requests_message | Custom message for API Management unauthorized requests monitor | string | `` | no | | unauthorized_requests_silenced | Groups to mute for API Management unauthorized requests monitor | map | `` | no | | unauthorized_requests_threshold_critical | Maximum acceptable percent of unauthorized requests | string | `90` | no | | unauthorized_requests_threshold_warning | Warning regarding acceptable percent of unauthorized requests | string | `50` | no | +| unauthorized_requests_timeframe | Monitor timeframe for API Management unauthorized requests [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 --------------------- diff --git a/cloud/azure/apimanagement/inputs.tf b/cloud/azure/apimanagement/inputs.tf index b006f1e..0a91eea 100644 --- a/cloud/azure/apimanagement/inputs.tf +++ b/cloud/azure/apimanagement/inputs.tf @@ -37,6 +37,12 @@ variable "status_message" { default = "" } +variable "status_timeframe" { + description = "Monitor timeframe for API Management status [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 "failed_requests_silenced" { description = "Groups to mute for API Management failed requests monitor" type = "map" @@ -49,6 +55,12 @@ variable "failed_requests_message" { default = "" } +variable "failed_requests_timeframe" { + description = "Monitor timeframe for API Management failed requests [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 "failed_requests_threshold_critical" { description = "Maximum acceptable percent of failed requests" default = 90 @@ -71,6 +83,12 @@ variable "other_requests_message" { default = "" } +variable "other_requests_timeframe" { + description = "Monitor timeframe for API Management other requests [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 "other_requests_threshold_critical" { description = "Maximum acceptable percent of other requests" default = 90 @@ -93,6 +111,12 @@ variable "unauthorized_requests_message" { default = "" } +variable "unauthorized_requests_timeframe" { + description = "Monitor timeframe for API Management unauthorized requests [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 "unauthorized_requests_threshold_critical" { description = "Maximum acceptable percent of unauthorized requests" default = 90 @@ -115,6 +139,12 @@ variable "successful_requests_message" { default = "" } +variable "successful_requests_timeframe" { + description = "Monitor timeframe for API Management successful requests [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 "successful_requests_threshold_critical" { description = "Minimum acceptable percent of successful requests" default = 10 diff --git a/cloud/azure/apimanagement/monitors-azure-apimanagement.tf b/cloud/azure/apimanagement/monitors-azure-apimanagement.tf index 573ebb7..1775ed2 100644 --- a/cloud/azure/apimanagement/monitors-azure-apimanagement.tf +++ b/cloud/azure/apimanagement/monitors-azure-apimanagement.tf @@ -13,7 +13,7 @@ resource "datadog_monitor" "apimgt_status" { message = "${coalesce(var.status_message, var.message)}" query = < ${var.failed_requests_threshold_critical} @@ -74,7 +74,7 @@ resource "datadog_monitor" "apimgt_other_requests" { message = "${coalesce(var.other_requests_message, var.message)}" query = < ${var.other_requests_threshold_critical} @@ -106,7 +106,7 @@ resource "datadog_monitor" "apimgt_unauthorized_requests" { message = "${coalesce(var.unauthorized_requests_message, var.message)}" query = < ${var.unauthorized_requests_threshold_critical} @@ -138,7 +138,7 @@ resource "datadog_monitor" "apimgt_successful_requests" { message = "${coalesce(var.successful_requests_message, var.message)}" query = <` | no | | http_4xx_requests_threshold_critical | Maximum critical acceptable percent of 4xx errors | string | `90` | no | | http_4xx_requests_threshold_warning | Warning regarding acceptable percent of 4xx errors | string | `50` | no | +| http_4xx_requests_timeframe | Monitor timeframe for App Services 4xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | http_5xx_requests_message | Custom message for App Services 5xx requests monitor | string | `` | no | | http_5xx_requests_silenced | Groups to mute for App Services 5xx requests monitor | map | `` | no | | http_5xx_requests_threshold_critical | Maximum critical acceptable percent of 5xx errors | string | `90` | no | | http_5xx_requests_threshold_warning | Warning regarding acceptable percent of 5xx errors | string | `50` | no | +| http_5xx_requests_timeframe | Monitor timeframe for App Services 5xx requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | http_successful_requests_message | Custom message for App Services successful requests monitor | string | `` | no | | http_successful_requests_silenced | Groups to mute for App Services successful requests monitor | map | `` | no | | http_successful_requests_threshold_critical | Minimum critical acceptable percent of 2xx & 3xx requests | string | `10` | no | | http_successful_requests_threshold_warning | Warning regarding acceptable percent of 2xx & 3xx requests | string | `30` | no | +| http_successful_requests_timeframe | Monitor timeframe for App Services successful requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | memory_usage_message | Custom message for App Services memory usage monitor | string | `` | no | | memory_usage_silenced | Groups to mute for App Services memory usage monitor | map | `` | no | | memory_usage_threshold_critical | Alerting threshold in Mib | string | `1073741824` | no | | memory_usage_threshold_warning | Warning threshold in MiB | string | `536870912` | no | +| memory_usage_timeframe | Monitor timeframe for App Services memory usage [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | message | Message sent when a monitor is triggered | string | - | yes | | response_time_message | Custom message for App Services response time monitor | string | `` | no | | response_time_silenced | Groups to mute for App Services response time monitor | map | `` | no | | response_time_threshold_critical | Alerting threshold for response time in seconds | string | `10` | no | | response_time_threshold_warning | Warning threshold for response time in seconds | string | `5` | no | +| response_time_timeframe | Monitor timeframe for App Services response time [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 --------------------- diff --git a/cloud/azure/app-services/inputs.tf b/cloud/azure/app-services/inputs.tf index dd2a9fa..d41e977 100644 --- a/cloud/azure/app-services/inputs.tf +++ b/cloud/azure/app-services/inputs.tf @@ -35,6 +35,12 @@ variable "response_time_message" { default = "" } +variable "response_time_timeframe" { + description = "Monitor timeframe for App Services response time [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 "response_time_threshold_critical" { default = 10 description = "Alerting threshold for response time in seconds" @@ -57,6 +63,12 @@ variable "memory_usage_message" { default = "" } +variable "memory_usage_timeframe" { + description = "Monitor timeframe for App Services memory usage [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 "memory_usage_threshold_critical" { default = 1073741824 # 1Gb description = "Alerting threshold in Mib" @@ -79,6 +91,12 @@ variable "http_4xx_requests_message" { default = "" } +variable "http_4xx_requests_timeframe" { + description = "Monitor timeframe for App Services 4xx requests [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 "http_4xx_requests_threshold_critical" { default = 90 description = "Maximum critical acceptable percent of 4xx errors" @@ -101,6 +119,12 @@ variable "http_5xx_requests_message" { default = "" } +variable "http_5xx_requests_timeframe" { + description = "Monitor timeframe for App Services 5xx requests [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 "http_5xx_requests_threshold_critical" { default = 90 description = "Maximum critical acceptable percent of 5xx errors" @@ -123,6 +147,12 @@ variable "http_successful_requests_message" { default = "" } +variable "http_successful_requests_timeframe" { + description = "Monitor timeframe for App Services successful requests [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 "http_successful_requests_threshold_critical" { default = 10 description = "Minimum critical acceptable percent of 2xx & 3xx requests" diff --git a/cloud/azure/app-services/monitors-app_services.tf b/cloud/azure/app-services/monitors-app_services.tf index fab2097..b8f639b 100644 --- a/cloud/azure/app-services/monitors-app_services.tf +++ b/cloud/azure/app-services/monitors-app_services.tf @@ -44,7 +44,7 @@ resource "datadog_monitor" "appservices_memory_usage_count" { message = "${coalesce(var.memory_usage_message, var.message)}" query = < ${var.memory_usage_threshold_critical} EOF @@ -75,7 +75,7 @@ resource "datadog_monitor" "appservices_http_5xx_errors_count" { message = "${coalesce(var.http_5xx_requests_message, var.message)}" query = < ${var.http_5xx_requests_threshold_critical} @@ -107,7 +107,7 @@ resource "datadog_monitor" "appservices_http_4xx_errors_count" { message = "${coalesce(var.http_4xx_requests_message, var.message)}" query = < ${var.http_4xx_requests_threshold_critical} @@ -139,7 +139,7 @@ resource "datadog_monitor" "appservices_http_success_status_rate" { message = "${coalesce(var.http_successful_requests_message, var.message)}" query = <` | no | | errors_rate_thresold_critical | Errors ratio (percentage) to trigger the critical alert | string | `90` | no | | errors_rate_thresold_warning | Errors ratio (percentage) to trigger a warning alert | string | `50` | no | +| errors_rate_timeframe | Monitor timeframe for Event Hub errors [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | failed_requests_rate_message | Custom message for Event Hub failed requests monitor | string | `` | no | | failed_requests_rate_silenced | Groups to mute for Event Hub failed requests monitor | map | `` | no | | failed_requests_rate_thresold_critical | Failed requests ratio (percentage) to trigger the critical alert | string | `90` | no | | failed_requests_rate_thresold_warning | Failed requests ratio (percentage) to trigger a warning alert | string | `50` | no | +| failed_requests_rate_timeframe | Monitor timeframe for Event Hub failed requests [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | 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 | | message | Message sent when an alert is triggered | string | - | yes | | status_message | Custom message for Event Hub status monitor | string | `` | no | | status_silenced | Groups to mute for Event Hub status monitor | map | `` | no | +| status_timeframe | Monitor timeframe for Event Hub status [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 --------------------- diff --git a/cloud/azure/eventhub/inputs.tf b/cloud/azure/eventhub/inputs.tf index 707a293..963be45 100644 --- a/cloud/azure/eventhub/inputs.tf +++ b/cloud/azure/eventhub/inputs.tf @@ -37,6 +37,12 @@ variable "status_message" { default = "" } +variable "status_timeframe" { + description = "Monitor timeframe for Event Hub status [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 "failed_requests_rate_silenced" { description = "Groups to mute for Event Hub failed requests monitor" type = "map" @@ -49,6 +55,12 @@ variable "failed_requests_rate_message" { default = "" } +variable "failed_requests_rate_timeframe" { + description = "Monitor timeframe for Event Hub failed requests [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 "failed_requests_rate_thresold_critical" { description = "Failed requests ratio (percentage) to trigger the critical alert" default = 90 @@ -71,6 +83,12 @@ variable "errors_rate_message" { default = "" } +variable "errors_rate_timeframe" { + description = "Monitor timeframe for Event Hub errors [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 "errors_rate_thresold_critical" { description = "Errors ratio (percentage) to trigger the critical alert" default = 90 diff --git a/cloud/azure/eventhub/monitors-eventhub.tf b/cloud/azure/eventhub/monitors-eventhub.tf index b68ccf0..21e531b 100644 --- a/cloud/azure/eventhub/monitors-eventhub.tf +++ b/cloud/azure/eventhub/monitors-eventhub.tf @@ -11,7 +11,7 @@ resource "datadog_monitor" "eventhub_status" { message = "${coalesce(var.status_message, var.message)}" query = <` | no | +| dropped_d2c_telemetry_egress_timeframe | Monitor timeframe for IoT Hub dropped d2c telemetry [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 | - | yes | | failed_c2d_methods_rate_message | Custom message for IoT Hub failed c2d method monitor | string | `` | no | | failed_c2d_methods_rate_silenced | Groups to mute for IoT Hub failed c2d methods monitor | map | `` | no | | failed_c2d_methods_rate_threshold_critical | C2D Methods Failed rate limit (critical threshold) | string | `90` | no | | failed_c2d_methods_rate_threshold_warning | C2D Methods Failed rate limit (warning threshold) | string | `50` | no | +| failed_c2d_methods_rate_timeframe | Monitor timeframe for IoT Hub failed c2d method [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | failed_c2d_twin_read_rate_message | Custom message for IoT Hub failed c2d twin read monitor | string | `` | no | | failed_c2d_twin_read_rate_silenced | Groups to mute for IoT Hub failed c2d twin read monitor | map | `` | no | | failed_c2d_twin_read_rate_threshold_critical | C2D Twin Read Failed rate limit (critical threshold) | string | `90` | no | | failed_c2d_twin_read_rate_threshold_warning | C2D Twin Read Failed rate limit (warning threshold) | string | `50` | no | +| failed_c2d_twin_read_rate_timeframe | Monitor timeframe for IoT Hub failed c2d twin read [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | failed_c2d_twin_update_rate_message | Custom message for IoT Hub failed c2d twin update monitor | string | `` | no | | failed_c2d_twin_update_rate_silenced | Groups to mute for IoT Hub failed c2d twin update monitor | map | `` | no | | failed_c2d_twin_update_rate_threshold_critical | C2D Twin Update Failed rate limit (critical threshold) | string | `90` | no | | failed_c2d_twin_update_rate_threshold_warning | C2D Twin Update Failed rate limit (warning threshold) | string | `50` | no | +| failed_c2d_twin_update_rate_timeframe | Monitor timeframe for IoT Hub failed c2d twin update [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | failed_d2c_twin_read_rate_message | Custom message for IoT Hub failed d2c twin read monitor | string | `` | no | | failed_d2c_twin_read_rate_silenced | Groups to mute for IoT Hub failed d2c twin read monitor | map | `` | no | | failed_d2c_twin_read_rate_threshold_critical | D2C Twin Read Failed rate limit (critical threshold) | string | `90` | no | | failed_d2c_twin_read_rate_threshold_warning | D2C Twin Read Failed rate limit (warning threshold) | string | `50` | no | +| failed_d2c_twin_read_rate_timeframe | Monitor timeframe for IoT Hub failed d2c twin read [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | failed_d2c_twin_update_rate_message | Custom message for IoT Hub failed d2c twin update monitor | string | `` | no | | failed_d2c_twin_update_rate_silenced | Groups to mute for IoT Hub failed d2c twin update monitor | map | `` | no | | failed_d2c_twin_update_rate_threshold_critical | D2C Twin Update Failed rate limit (critical threshold) | string | `90` | no | | failed_d2c_twin_update_rate_threshold_warning | D2C Twin Update Failed rate limit (warning threshold) | string | `50` | no | +| failed_d2c_twin_update_rate_timeframe | Monitor timeframe for IoT Hub failed d2c twin update [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | failed_jobs_rate_message | Custom message for IoT Hub failed jobs monitor | string | `` | no | | failed_jobs_rate_silenced | Groups to mute for IoT Hub failed jobs monitor | map | `` | no | | failed_jobs_rate_threshold_critical | Jobs Failed rate limit (critical threshold) | string | `90` | no | | failed_jobs_rate_threshold_warning | Jobs Failed rate limit (warning threshold) | string | `50` | no | +| failed_jobs_rate_timeframe | Monitor timeframe for IoT Hub failed jobs [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | failed_listjobs_rate_message | Custom message for IoT Hub failed list jobs monitor | string | `` | no | | failed_listjobs_rate_silenced | Groups to mute for IoT Hub failed list jobs monitor | map | `` | no | | failed_listjobs_rate_threshold_critical | ListJobs Failed rate limit (critical threshold) | string | `90` | no | | failed_listjobs_rate_threshold_warning | ListJobs Failed rate limit (warning threshold) | string | `50` | no | +| failed_listjobs_rate_timeframe | Monitor timeframe for IoT Hub failed list jobs [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | failed_queryjobs_rate_message | Custom message for IoT Hub failed query jobs monitor | string | `` | no | | failed_queryjobs_rate_silenced | Groups to mute for IoT Hub failed query jobs monitor | map | `` | no | | failed_queryjobs_rate_threshold_critical | QueryJobs Failed rate limit (critical threshold) | string | `90` | no | | failed_queryjobs_rate_threshold_warning | QueryJobs Failed rate limit (warning threshold) | string | `50` | no | +| failed_queryjobs_rate_timeframe | Monitor timeframe for IoT Hub failed query jobs [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | filter_tags | Tags used for filtering | string | `*` | no | | invalid_d2c_telemetry_egress_message | Custom message for IoT Hub invalid d2c telemetry monitor | string | `` | no | | invalid_d2c_telemetry_egress_rate_threshold_critical | D2C Telemetry Invalid limit (critical threshold) | string | `90` | no | | invalid_d2c_telemetry_egress_rate_threshold_warning | D2C Telemetry Invalid limit (warning threshold) | string | `50` | no | | invalid_d2c_telemetry_egress_silenced | Groups to mute for IoT Hub invalid d2c telemetry monitor | map | `` | no | +| invalid_d2c_telemetry_egress_timeframe | Monitor timeframe for IoT Hub invalid d2c telemetry [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | message | Message sent when an alert is triggered | string | - | yes | | orphaned_d2c_telemetry_egress_message | Custom message for IoT Hub orphaned d2c telemetry monitor | string | `` | no | | orphaned_d2c_telemetry_egress_rate_threshold_critical | D2C Telemetry Orphaned limit (critical threshold) | string | `90` | no | | orphaned_d2c_telemetry_egress_rate_threshold_warning | D2C Telemetry Orphaned limit (warning threshold) | string | `50` | no | | orphaned_d2c_telemetry_egress_silenced | Groups to mute for IoT Hub orphaned d2c telemetry monitor | map | `` | no | +| orphaned_d2c_telemetry_egress_timeframe | Monitor timeframe for IoT Hub orphaned d2c telemetry [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | status_message | Custom message for IoT Hub status monitor | string | `` | no | | status_silenced | Groups to mute for IoT Hub status monitor | map | `` | no | +| status_timeframe | Monitor timeframe for IoT Hub status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | too_many_d2c_telemetry_ingress_nosent_message | Custom message for IoT Hub unsent d2c telemetry monitor | string | `` | no | | too_many_d2c_telemetry_ingress_nosent_silenced | Groups to mute for IoT Hub unsent d2c telemetry monitor | map | `` | no | +| too_many_d2c_telemetry_ingress_nosent_timeframe | Monitor timeframe for IoT Hub unsent d2c telemetry [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | total_devices_message | Custom message for IoT Hub total devices monitor | string | `` | no | | total_devices_silenced | Groups to mute for IoT Hub total devices monitor | map | `` | no | +| total_devices_timeframe | Monitor timeframe for IoT Hub total devices [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 --------------------- diff --git a/cloud/azure/iothubs/inputs.tf b/cloud/azure/iothubs/inputs.tf index e58f862..47680e2 100644 --- a/cloud/azure/iothubs/inputs.tf +++ b/cloud/azure/iothubs/inputs.tf @@ -32,6 +32,12 @@ variable "status_message" { default = "" } +variable "status_timeframe" { + description = "Monitor timeframe for IoT Hub status [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 "total_devices_silenced" { description = "Groups to mute for IoT Hub total devices monitor" type = "map" @@ -44,6 +50,12 @@ variable "total_devices_message" { default = "" } +variable "total_devices_timeframe" { + description = "Monitor timeframe for IoT Hub total devices [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 "too_many_d2c_telemetry_ingress_nosent_silenced" { description = "Groups to mute for IoT Hub unsent d2c telemetry monitor" type = "map" @@ -56,6 +68,12 @@ variable "too_many_d2c_telemetry_ingress_nosent_message" { default = "" } +variable "too_many_d2c_telemetry_ingress_nosent_timeframe" { + description = "Monitor timeframe for IoT Hub unsent d2c telemetry [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 "failed_jobs_rate_silenced" { description = "Groups to mute for IoT Hub failed jobs monitor" type = "map" @@ -68,6 +86,12 @@ variable "failed_jobs_rate_message" { default = "" } +variable "failed_jobs_rate_timeframe" { + description = "Monitor timeframe for IoT Hub failed jobs [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 "failed_jobs_rate_threshold_warning" { description = "Jobs Failed rate limit (warning threshold)" default = 50 @@ -90,6 +114,12 @@ variable "failed_listjobs_rate_message" { default = "" } +variable "failed_listjobs_rate_timeframe" { + description = "Monitor timeframe for IoT Hub failed list jobs [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 "failed_listjobs_rate_threshold_warning" { description = "ListJobs Failed rate limit (warning threshold)" default = 50 @@ -112,6 +142,12 @@ variable "failed_queryjobs_rate_message" { default = "" } +variable "failed_queryjobs_rate_timeframe" { + description = "Monitor timeframe for IoT Hub failed query jobs [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 "failed_queryjobs_rate_threshold_warning" { description = "QueryJobs Failed rate limit (warning threshold)" default = 50 @@ -134,6 +170,12 @@ variable "failed_c2d_methods_rate_message" { default = "" } +variable "failed_c2d_methods_rate_timeframe" { + description = "Monitor timeframe for IoT Hub failed c2d method [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 "failed_c2d_methods_rate_threshold_warning" { description = "C2D Methods Failed rate limit (warning threshold)" default = 50 @@ -156,6 +198,12 @@ variable "failed_c2d_twin_read_rate_message" { default = "" } +variable "failed_c2d_twin_read_rate_timeframe" { + description = "Monitor timeframe for IoT Hub failed c2d twin read [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 "failed_c2d_twin_read_rate_threshold_warning" { description = "C2D Twin Read Failed rate limit (warning threshold)" default = 50 @@ -178,6 +226,12 @@ variable "failed_c2d_twin_update_rate_message" { default = "" } +variable "failed_c2d_twin_update_rate_timeframe" { + description = "Monitor timeframe for IoT Hub failed c2d twin update [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 "failed_c2d_twin_update_rate_threshold_warning" { description = "C2D Twin Update Failed rate limit (warning threshold)" default = 50 @@ -200,6 +254,12 @@ variable "failed_d2c_twin_read_rate_message" { default = "" } +variable "failed_d2c_twin_read_rate_timeframe" { + description = "Monitor timeframe for IoT Hub failed d2c twin read [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 "failed_d2c_twin_read_rate_threshold_warning" { description = "D2C Twin Read Failed rate limit (warning threshold)" default = 50 @@ -222,6 +282,12 @@ variable "failed_d2c_twin_update_rate_message" { default = "" } +variable "failed_d2c_twin_update_rate_timeframe" { + description = "Monitor timeframe for IoT Hub failed d2c twin update [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 "failed_d2c_twin_update_rate_threshold_warning" { description = "D2C Twin Update Failed rate limit (warning threshold)" default = 50 @@ -244,6 +310,12 @@ variable "dropped_d2c_telemetry_egress_message" { default = "" } +variable "dropped_d2c_telemetry_egress_timeframe" { + description = "Monitor timeframe for IoT Hub dropped d2c telemetry [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 "dropped_d2c_telemetry_egress_rate_threshold_warning" { description = "D2C Telemetry Dropped limit (warning threshold)" default = 50 @@ -266,6 +338,12 @@ variable "orphaned_d2c_telemetry_egress_message" { default = "" } +variable "orphaned_d2c_telemetry_egress_timeframe" { + description = "Monitor timeframe for IoT Hub orphaned d2c telemetry [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 "orphaned_d2c_telemetry_egress_rate_threshold_warning" { description = "D2C Telemetry Orphaned limit (warning threshold)" default = 50 @@ -288,6 +366,12 @@ variable "invalid_d2c_telemetry_egress_message" { default = "" } +variable "invalid_d2c_telemetry_egress_timeframe" { + description = "Monitor timeframe for IoT Hub invalid d2c telemetry [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 "invalid_d2c_telemetry_egress_rate_threshold_warning" { description = "D2C Telemetry Invalid limit (warning threshold)" default = 50 diff --git a/cloud/azure/iothubs/monitors-iothubs.tf b/cloud/azure/iothubs/monitors-iothubs.tf index 6c5f53f..4a70a02 100644 --- a/cloud/azure/iothubs/monitors-iothubs.tf +++ b/cloud/azure/iothubs/monitors-iothubs.tf @@ -3,7 +3,7 @@ resource "datadog_monitor" "too_many_jobs_failed" { message = "${coalesce(var.failed_jobs_rate_message, var.message)}" query = < 0 diff --git a/cloud/azure/redis/README.md b/cloud/azure/redis/README.md index a6b0883..b8ebdcc 100644 --- a/cloud/azure/redis/README.md +++ b/cloud/azure/redis/README.md @@ -33,6 +33,7 @@ Inputs | evictedkeys_limit_silenced | Groups to mute for Redis evicted keys monitor | map | `` | no | | evictedkeys_limit_threshold_critical | Evicted keys limit (critical threshold) | string | `100` | no | | evictedkeys_limit_threshold_warning | Evicted keys limit (warning threshold) | string | `0` | no | +| evictedkeys_limit_timeframe | Monitor timeframe for Redis evicted keys [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | 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 | | message | Message sent when a Redis monitor is triggered | string | - | yes | @@ -40,12 +41,15 @@ Inputs | percent_processor_time_silenced | Groups to mute for Redis processor monitor | map | `` | no | | percent_processor_time_threshold_critical | Processor time percent (critical threshold) | string | `80` | no | | percent_processor_time_threshold_warning | Processor time percent (warning threshold) | string | `60` | no | +| percent_processor_time_timeframe | Monitor timeframe for Redis processor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | server_load_rate_message | Custom message for Redis server load monitor | string | `` | no | | server_load_rate_silenced | Groups to mute for Redis server load monitor | map | `` | no | | server_load_rate_threshold_critical | Server CPU load rate (critical threshold) | string | `90` | no | | server_load_rate_threshold_warning | Server CPU load rate (warning threshold) | string | `70` | no | +| server_load_rate_timeframe | Monitor timeframe for Redis server load [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | status_message | Custom message for Redis status monitor | string | `` | no | | status_silenced | Groups to mute for Redis status monitor | map | `` | no | +| status_timeframe | Monitor timeframe for Redis status [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 --------------------- diff --git a/cloud/azure/redis/inputs.tf b/cloud/azure/redis/inputs.tf index 11725bc..e3c0887 100644 --- a/cloud/azure/redis/inputs.tf +++ b/cloud/azure/redis/inputs.tf @@ -37,6 +37,12 @@ variable "status_message" { default = "" } +variable "status_timeframe" { + description = "Monitor timeframe for Redis status [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 "evictedkeys_limit_silenced" { description = "Groups to mute for Redis evicted keys monitor" type = "map" @@ -49,6 +55,12 @@ variable "evictedkeys_limit_message" { default = "" } +variable "evictedkeys_limit_timeframe" { + description = "Monitor timeframe for Redis evicted keys [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 "evictedkeys_limit_threshold_warning" { description = "Evicted keys limit (warning threshold)" default = 0 @@ -71,6 +83,12 @@ variable "percent_processor_time_message" { default = "" } +variable "percent_processor_time_timeframe" { + description = "Monitor timeframe for Redis processor [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 "percent_processor_time_threshold_critical" { description = "Processor time percent (critical threshold)" default = 80 @@ -93,6 +111,12 @@ variable "server_load_rate_message" { default = "" } +variable "server_load_rate_timeframe" { + description = "Monitor timeframe for Redis server load [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 "server_load_rate_threshold_critical" { description = "Server CPU load rate (critical threshold)" default = 90 diff --git a/cloud/azure/redis/monitors-azure-redis.tf b/cloud/azure/redis/monitors-azure-redis.tf index 0002d96..a61b651 100644 --- a/cloud/azure/redis/monitors-azure-redis.tf +++ b/cloud/azure/redis/monitors-azure-redis.tf @@ -11,7 +11,7 @@ resource "datadog_monitor" "status" { message = "${coalesce(var.status_message, var.message)}" query = < ${var.evictedkeys_limit_threshold_critical} EOF @@ -68,7 +68,7 @@ resource "datadog_monitor" "percent_processor_time" { message = "${coalesce(var.percent_processor_time_message, var.message)}" query = < ${var.percent_processor_time_threshold_critical} EOF @@ -100,7 +100,7 @@ resource "datadog_monitor" "server_load" { message = "${coalesce(var.server_load_rate_message, var.message)}" query = < ${var.server_load_rate_threshold_critical} EOF diff --git a/cloud/azure/sql-database/README.md b/cloud/azure/sql-database/README.md index 1291389..8b993bb 100644 --- a/cloud/azure/sql-database/README.md +++ b/cloud/azure/sql-database/README.md @@ -31,18 +31,22 @@ Inputs | cpu_silenced | Groups to mute for SQL CPU monitor | map | `` | no | | cpu_threshold_critical | CPU usage in percent (critical threshold) | string | `90` | no | | cpu_threshold_warning | CPU usage in percent (warning threshold) | string | `80` | no | +| cpu_timeframe | Monitor timeframe for SQL CPU [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | | deadlock_message | Custom message for SQL Deadlock monitor | string | `` | no | | deadlock_silenced | Groups to mute for SQL Deadlock monitor | map | `` | no | | deadlock_threshold_critical | Amount of Deadlocks (critical threshold) | string | `1` | no | +| deadlock_timeframe | Monitor timeframe for SQL Deadlock [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | | delay | Delay in seconds for the metric evaluation | string | `900` | no | | diskspace_message | Custom message for SQL disk space monitor | string | `` | no | | diskspace_silenced | Groups to mute for SQL disk space monitor | map | `` | no | | diskspace_threshold_critical | Disk space used in percent (critical threshold) | string | `90` | no | | diskspace_threshold_warning | Disk space used in percent (warning threshold) | string | `80` | no | +| diskspace_timeframe | Monitor timeframe for SQL disk space [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | | dtu_message | Custom message for SQL DTU monitor | string | `` | no | | dtu_silenced | Groups to mute for SQL DTU monitor | map | `` | no | | dtu_threshold_critical | Amount of DTU used (critical threshold) | string | `90` | no | | dtu_threshold_warning | Amount of DTU used (warning threshold) | string | `85` | no | +| dtu_timeframe | Monitor timeframe for SQL DTU [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 | - | 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 | diff --git a/cloud/azure/sql-database/inputs.tf b/cloud/azure/sql-database/inputs.tf index 9f6d6b8..386de15 100644 --- a/cloud/azure/sql-database/inputs.tf +++ b/cloud/azure/sql-database/inputs.tf @@ -37,6 +37,12 @@ variable "cpu_message" { default = "" } +variable "cpu_timeframe" { + description = "Monitor timeframe for SQL 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_threshold_warning" { description = "CPU usage in percent (warning threshold)" default = "80" @@ -59,6 +65,12 @@ variable "diskspace_message" { default = "" } +variable "diskspace_timeframe" { + description = "Monitor timeframe for SQL disk space [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 "diskspace_threshold_warning" { description = "Disk space used in percent (warning threshold)" default = "80" @@ -81,6 +93,12 @@ variable "dtu_message" { default = "" } +variable "dtu_timeframe" { + description = "Monitor timeframe for SQL DTU [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 "dtu_threshold_warning" { description = "Amount of DTU used (warning threshold)" default = "85" @@ -103,6 +121,12 @@ variable "deadlock_message" { default = "" } +variable "deadlock_timeframe" { + description = "Monitor timeframe for SQL Deadlock [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 "deadlock_threshold_critical" { description = "Amount of Deadlocks (critical threshold)" default = "1" diff --git a/cloud/azure/sql-database/monitors-sql-database-basics.tf b/cloud/azure/sql-database/monitors-sql-database-basics.tf index 678e8c0..391db76 100644 --- a/cloud/azure/sql-database/monitors-sql-database-basics.tf +++ b/cloud/azure/sql-database/monitors-sql-database-basics.tf @@ -11,7 +11,7 @@ resource "datadog_monitor" "sql-database_cpu_90_15min" { message = "${coalesce(var.cpu_message, var.message)}" query = < ${var.cpu_threshold_critical} EOF @@ -44,7 +44,7 @@ resource "datadog_monitor" "sql-database_free_space_low" { type = "metric alert" query = < ${var.diskspace_threshold_critical} EOF @@ -76,7 +76,7 @@ resource "datadog_monitor" "sql-database_dtu_consumption_high" { type = "metric alert" query = < ${var.dtu_threshold_critical} EOF @@ -108,7 +108,7 @@ resource "datadog_monitor" "sql-database_deadlocks_count" { type = "metric alert" query = < ${var.deadlock_threshold_critical} EOF