MON-92 - Update monitor and inputs

This commit is contained in:
Alexandre Gaillet 2018-02-21 14:38:52 +01:00
parent 98c03062fd
commit e3c07e9089
3 changed files with 6 additions and 6 deletions

View File

@ -75,7 +75,7 @@ Inputs
| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| environment | Architecture Environment | string | - | yes |
| evaluation_delay | Delay in seconds for the metric evaluation | string | `600` | no |
| evaluation_delay | Delay in seconds for the metric evaluation | string | `15` | 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 |

View File

@ -7,7 +7,7 @@ variable "environment" {
# Global DataDog
variable "evaluation_delay" {
description = "Delay in seconds for the metric evaluation"
default = 600
default = 15
}
variable "message" {

View File

@ -7,13 +7,13 @@ data "template_file" "filter" {
}
resource "datadog_monitor" "mongodb_replicaset_state" {
name = "[${var.environment}] Replica Set heath for {{ replset_name }}"
name = "[${var.environment}] Replica Set health"
message = "${var.message}"
query = <<EOF
avg(last_5m): (
avg:mongodb.replset.health{${data.template_file.filter.rendered}} by {region,replset_name}
) == 0
) < 1
EOF
type = "metric alert"
@ -25,7 +25,7 @@ resource "datadog_monitor" "mongodb_replicaset_state" {
notify_audit = false
timeout_h = 0
include_tags = true
require_full_window = false
require_full_window = true
tags = ["env:${var.environment}", "resource:mongodb", "team:aws", "provider:aws"]
tags = ["env:${var.environment}", "resource:mongodb"]
}