diff --git a/cloud/azure/README.md b/cloud/azure/README.md index d956a3c..1a02600 100644 --- a/cloud/azure/README.md +++ b/cloud/azure/README.md @@ -152,6 +152,8 @@ Inputs | redis_status_silenced | Groups to mute for Redis status monitor | map | `` | no | | servicebus_status_message | Custom message for Service Bus status monitor | string | `` | no | | servicebus_status_silenced | Groups to mute for Service Bus status monitor | map | `` | no | +| servicebus_status_timeframe | Monitor timeframe for Service Bus status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | +| servicebus_status_aggregator | Monitor timeframe aggregator for Service Bus status [available values: min, max, sum or avg] | string | `min` | no | | sqldatabase_cpu_message | Custom message for SQL CPU monitor | string | `` | no | | sqldatabase_cpu_silenced | Groups to mute for SQL CPU monitor | map | `` | no | | sqldatabase_cpu_threshold_critical | CPU usage in percent (critical threshold) | string | `90` | no | diff --git a/cloud/azure/inputs.tf b/cloud/azure/inputs.tf index 5eff7c9..f7b804f 100644 --- a/cloud/azure/inputs.tf +++ b/cloud/azure/inputs.tf @@ -668,6 +668,17 @@ variable "servicebus_status_message" { default = "" } +variable "servicebus_status_aggregator" { + description = "Monitor aggregator for Service Bus status [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + +variable "servicebus_status_timeframe" { + description = "Monitor timeframe for Service Bus status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + default = "last_15m" +} + # Azure SQL Database specific variables variable "sqldatabase_cpu_silenced" { description = "Groups to mute for SQL CPU monitor" diff --git a/cloud/azure/monitors.tf b/cloud/azure/monitors.tf index ceeafe1..b16988e 100644 --- a/cloud/azure/monitors.tf +++ b/cloud/azure/monitors.tf @@ -178,8 +178,10 @@ module "servicebus" { filter_tags_use_defaults = "${var.filter_tags_use_defaults}" filter_tags_custom = "${var.filter_tags_custom}" - status_silenced = "${var.servicebus_status_silenced}" - status_message = "${var.servicebus_status_message}" + status_silenced = "${var.servicebus_status_silenced}" + status_message = "${var.servicebus_status_message}" + status_timeframe = "${var.servicebus_status_timeframe}" + status_timeframe_aggregator = "${var.servicebus_status_aggregator}" } module "sqldatabase" { diff --git a/cloud/azure/servicebus/README.md b/cloud/azure/servicebus/README.md index 0de63c3..461ee40 100644 --- a/cloud/azure/servicebus/README.md +++ b/cloud/azure/servicebus/README.md @@ -31,6 +31,8 @@ Inputs | message | Message sent when an alert is triggered | string | - | yes | | status_message | Custom message for Service Bus status monitor | string | `` | no | | status_silenced | Groups to mute for Service Bus status monitor | map | `` | no | +| status_timeframe | Monitor timeframe for Service Bus status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_15m` | no | +| status_aggregator | Monitor aggregator for Service Bus status [available values: min, max, sum or avg] | string | `min` | no | Related documentation --------------------- diff --git a/cloud/azure/servicebus/inputs.tf b/cloud/azure/servicebus/inputs.tf index 3ea3306..6ea0587 100644 --- a/cloud/azure/servicebus/inputs.tf +++ b/cloud/azure/servicebus/inputs.tf @@ -36,3 +36,14 @@ variable "status_message" { type = "string" default = "" } + +variable "status_aggregator" { + description = "Monitor aggregator for Service Bus status [available values: min, max, sum or avg]" + type = "string" + default = "min" +} + +variable "status_timeframe" { + description = "Monitor timeframe for Service Bus status [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + default = "last_15m" +} diff --git a/cloud/azure/servicebus/monitors-service-bus.tf b/cloud/azure/servicebus/monitors-service-bus.tf index f9bdb8a..607d99b 100644 --- a/cloud/azure/servicebus/monitors-service-bus.tf +++ b/cloud/azure/servicebus/monitors-service-bus.tf @@ -11,7 +11,9 @@ resource "datadog_monitor" "servicebus_status" { message = "${coalesce(var.status_message, var.message)}" query = <