MON-92 - Hardcode threshold
This commit is contained in:
parent
e383e800d0
commit
98c03062fd
@ -79,4 +79,3 @@ Inputs
|
|||||||
| 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 |
|
||||||
| replica_status_critical | The ReplicaSet status is DOWN | string | `0` | no |
|
|
||||||
|
|||||||
@ -23,9 +23,3 @@ variable "filter_tags_custom" {
|
|||||||
description = "Tags used for custom filtering when filter_tags_use_defaults is false"
|
description = "Tags used for custom filtering when filter_tags_use_defaults is false"
|
||||||
default = "*"
|
default = "*"
|
||||||
}
|
}
|
||||||
|
|
||||||
##MongoDB
|
|
||||||
variable "replica_status_critical" {
|
|
||||||
description = "The ReplicaSet status is DOWN"
|
|
||||||
default = 0
|
|
||||||
}
|
|
||||||
|
|||||||
@ -13,15 +13,11 @@ resource "datadog_monitor" "mongodb_replicaset_state" {
|
|||||||
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}
|
||||||
) == ${var.replica_status_critical}
|
) == 0
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|
||||||
thresholds {
|
|
||||||
critical = "${var.replica_status_critical}"
|
|
||||||
}
|
|
||||||
|
|
||||||
notify_no_data = true
|
notify_no_data = true
|
||||||
renotify_interval = 0
|
renotify_interval = 0
|
||||||
evaluation_delay = "${var.evaluation_delay}"
|
evaluation_delay = "${var.evaluation_delay}"
|
||||||
|
|||||||
@ -96,6 +96,7 @@ variable "elb_4xx_threshold" {
|
|||||||
|
|
||||||
variable "elb_backend_latency" {
|
variable "elb_backend_latency" {
|
||||||
description = "Average time elapsed after the request leaves the load balancer until a response is received. In seconds"
|
description = "Average time elapsed after the request leaves the load balancer until a response is received. In seconds"
|
||||||
|
|
||||||
default = {
|
default = {
|
||||||
warning = 1
|
warning = 1
|
||||||
critical = 5
|
critical = 5
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user