MON-92 - Update monitor and inputs
This commit is contained in:
parent
98c03062fd
commit
e3c07e9089
@ -75,7 +75,7 @@ Inputs
|
|||||||
| Name | Description | Type | Default | Required |
|
| Name | Description | Type | Default | Required |
|
||||||
|------|-------------|:----:|:-----:|:-----:|
|
|------|-------------|:----:|:-----:|:-----:|
|
||||||
| environment | Architecture Environment | string | - | yes |
|
| 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_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 |
|
||||||
|
|||||||
@ -7,7 +7,7 @@ variable "environment" {
|
|||||||
# Global DataDog
|
# Global DataDog
|
||||||
variable "evaluation_delay" {
|
variable "evaluation_delay" {
|
||||||
description = "Delay in seconds for the metric evaluation"
|
description = "Delay in seconds for the metric evaluation"
|
||||||
default = 600
|
default = 15
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "message" {
|
variable "message" {
|
||||||
|
|||||||
@ -7,13 +7,13 @@ data "template_file" "filter" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "datadog_monitor" "mongodb_replicaset_state" {
|
resource "datadog_monitor" "mongodb_replicaset_state" {
|
||||||
name = "[${var.environment}] Replica Set heath for {{ replset_name }}"
|
name = "[${var.environment}] Replica Set health"
|
||||||
message = "${var.message}"
|
message = "${var.message}"
|
||||||
|
|
||||||
query = <<EOF
|
query = <<EOF
|
||||||
avg(last_5m): (
|
avg(last_5m): (
|
||||||
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}
|
||||||
) == 0
|
) < 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
@ -25,7 +25,7 @@ resource "datadog_monitor" "mongodb_replicaset_state" {
|
|||||||
notify_audit = false
|
notify_audit = false
|
||||||
timeout_h = 0
|
timeout_h = 0
|
||||||
include_tags = true
|
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"]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user