MON-271 harcode service check threasholds
This commit is contained in:
parent
a710f3ff42
commit
9e2d429213
@ -93,14 +93,9 @@ Creates DataDog monitors with the following checks:
|
|||||||
| mem_used_timeframe | Monitor timeframe for Redis RAM memory used [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
|
| mem_used_timeframe | Monitor timeframe for Redis RAM memory used [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `last_5m` | no |
|
||||||
| message | Message sent when a Redis monitor is triggered | string | - | yes |
|
| message | Message sent when a Redis monitor is triggered | string | - | yes |
|
||||||
| new_host_delay | Delay in seconds for the metric evaluation | string | `300` | no |
|
| new_host_delay | Delay in seconds for the metric evaluation | string | `300` | no |
|
||||||
| not_responding_by | Group by for the service check | string | `"host","redis_host","redis_port"` | no |
|
|
||||||
| not_responding_extra_tags | Extra tags for Redis does not respond monitor | string | `` | no |
|
| not_responding_extra_tags | Extra tags for Redis does not respond monitor | string | `` | no |
|
||||||
| not_responding_last | Parameter 'last' for the service check | string | `6` | no |
|
|
||||||
| not_responding_message | Custom message for Redis does not respond monitor | string | `` | no |
|
| not_responding_message | Custom message for Redis does not respond monitor | string | `` | no |
|
||||||
| not_responding_silenced | Groups to mute for Redis does not respond monitor | map | `<map>` | no |
|
| not_responding_silenced | Groups to mute for Redis does not respond monitor | map | `<map>` | no |
|
||||||
| not_responding_threshold_critical | Not responding limit (critical threshold) | string | `5` | no |
|
|
||||||
| not_responding_threshold_ok | Not responding limit (ok threshold) | string | `1` | no |
|
|
||||||
| not_responding_threshold_warning | Not responding limit (warning threshold) | string | `1` | no |
|
|
||||||
| redis_silenced | Groups to mute for Redis monitors | map | `<map>` | no |
|
| redis_silenced | Groups to mute for Redis monitors | map | `<map>` | no |
|
||||||
| rejected_con_extra_tags | Extra tags for Redis rejected connections errors monitor | string | `` | no |
|
| rejected_con_extra_tags | Extra tags for Redis rejected connections errors monitor | string | `` | no |
|
||||||
| rejected_con_message | Custom message for Redis rejected connections errors monitor | string | `` | no |
|
| rejected_con_message | Custom message for Redis rejected connections errors monitor | string | `` | no |
|
||||||
|
|||||||
@ -419,30 +419,3 @@ variable "not_responding_extra_tags" {
|
|||||||
type = "string"
|
type = "string"
|
||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "not_responding_by" {
|
|
||||||
description = "Group by for the service check"
|
|
||||||
type = "string"
|
|
||||||
default = "\"host\",\"redis_host\",\"redis_port\""
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "not_responding_last" {
|
|
||||||
description = "Parameter 'last' for the service check"
|
|
||||||
type = "string"
|
|
||||||
default = 6
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "not_responding_threshold_critical" {
|
|
||||||
description = "Not responding limit (critical threshold)"
|
|
||||||
default = 5
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "not_responding_threshold_warning" {
|
|
||||||
description = "Not responding limit (warning threshold)"
|
|
||||||
default = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "not_responding_threshold_ok" {
|
|
||||||
description = "Not responding limit (ok threshold)"
|
|
||||||
default = 1
|
|
||||||
}
|
|
||||||
|
|||||||
@ -333,16 +333,15 @@ resource "datadog_monitor" "not_responding" {
|
|||||||
name = "[${var.environment}] Redis does not respond"
|
name = "[${var.environment}] Redis does not respond"
|
||||||
message = "${coalesce(var.not_responding_message, var.message)}"
|
message = "${coalesce(var.not_responding_message, var.message)}"
|
||||||
|
|
||||||
query = <<EOL
|
|
||||||
"redis.can_connect".over${module.filter-tags.service_check}.by(${var.not_responding_by}).last(${var.not_responding_last}).count_by_status()
|
|
||||||
EOL
|
|
||||||
|
|
||||||
type = "service check"
|
type = "service check"
|
||||||
|
|
||||||
|
query = <<EOF
|
||||||
|
"redis.can_connect".over${module.filter-tags.service_check}.by("host","redis_host","redis_port").last(6).count_by_status()
|
||||||
|
EOF
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
warning = "${var.not_responding_threshold_warning}"
|
ok = 1
|
||||||
critical = "${var.not_responding_threshold_critical}"
|
critical = 5
|
||||||
ok = "${var.not_responding_threshold_ok}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
silenced = "${var.not_responding_silenced}"
|
silenced = "${var.not_responding_silenced}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user