diff --git a/databases/mongodb/README.md b/databases/mongodb/README.md index f71378f..fc521cd 100644 --- a/databases/mongodb/README.md +++ b/databases/mongodb/README.md @@ -74,10 +74,11 @@ Inputs | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| environment | Architecture Environment | string | - | yes | | delay | Delay in seconds for the metric evaluation | string | `15` | 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 | | message | Message sent when an alert is triggered | string | - | yes | | mongodb_replicaset_message | Custom message for Mongodb replicaset monitor | string | `` | no | | mongodb_replicaset_silenced | Groups to mute for Mongodb replicaset monitor | map | `` | no | +| mongodb_replicaset_timeframe | Monitor timeframe for Mongodb replicaset [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no | diff --git a/databases/mongodb/inputs.tf b/databases/mongodb/inputs.tf index 091d746..46cf5ee 100644 --- a/databases/mongodb/inputs.tf +++ b/databases/mongodb/inputs.tf @@ -35,3 +35,9 @@ variable "mongodb_replicaset_message" { type = "string" default = "" } + +variable "mongodb_replicaset_timeframe" { + description = "Monitor timeframe for Mongodb replicaset [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]" + type = "string" + default = "last_5m" +} diff --git a/databases/mongodb/monitors-mongo.tf b/databases/mongodb/monitors-mongo.tf index 6e4fd1a..5357aeb 100644 --- a/databases/mongodb/monitors-mongo.tf +++ b/databases/mongodb/monitors-mongo.tf @@ -11,7 +11,7 @@ resource "datadog_monitor" "mongodb_replicaset_state" { message = "${coalesce(var.mongodb_replicaset_message, var.message)}" query = <