MON-160 - Mongodb monitors updated
This commit is contained in:
parent
6acd9c5671
commit
6276d9364c
@ -74,10 +74,11 @@ Inputs
|
|||||||
|
|
||||||
| Name | Description | Type | Default | Required |
|
| Name | Description | Type | Default | Required |
|
||||||
|------|-------------|:----:|:-----:|:-----:|
|
|------|-------------|:----:|:-----:|:-----:|
|
||||||
| environment | Architecture Environment | string | - | yes |
|
|
||||||
| delay | Delay in seconds for the metric evaluation | string | `15` | no |
|
| 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_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 |
|
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no |
|
||||||
| message | Message sent when an alert is triggered | string | - | yes |
|
| message | Message sent when an alert is triggered | string | - | yes |
|
||||||
| mongodb_replicaset_message | Custom message for Mongodb replicaset monitor | string | `` | no |
|
| mongodb_replicaset_message | Custom message for Mongodb replicaset monitor | string | `` | no |
|
||||||
| mongodb_replicaset_silenced | Groups to mute for Mongodb replicaset monitor | map | `<map>` | no |
|
| mongodb_replicaset_silenced | Groups to mute for Mongodb replicaset monitor | map | `<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 |
|
||||||
|
|||||||
@ -35,3 +35,9 @@ variable "mongodb_replicaset_message" {
|
|||||||
type = "string"
|
type = "string"
|
||||||
default = ""
|
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"
|
||||||
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@ resource "datadog_monitor" "mongodb_replicaset_state" {
|
|||||||
message = "${coalesce(var.mongodb_replicaset_message, var.message)}"
|
message = "${coalesce(var.mongodb_replicaset_message, var.message)}"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
avg(last_5m): (
|
avg(${var.mongodb_replicaset_timeframe}): (
|
||||||
avg:mongodb.replset.health{${data.template_file.filter.rendered}} by {region,replset_name}
|
avg:mongodb.replset.health{${data.template_file.filter.rendered}} by {region,replset_name}
|
||||||
) < 1
|
) < 1
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user