MON-142: Updated due to latest comments
This commit is contained in:
parent
de662094da
commit
ec9245f92c
@ -1,5 +1,5 @@
|
|||||||
MySQL DataDog monitors
|
MySQL DataDog monitors
|
||||||
==========================================
|
======================
|
||||||
|
|
||||||
How to use this module
|
How to use this module
|
||||||
----------------------
|
----------------------
|
||||||
@ -26,7 +26,7 @@ Inputs
|
|||||||
|
|
||||||
| Name | Description | Type | Default | Required |
|
| Name | Description | Type | Default | Required |
|
||||||
|------|-------------|:----:|:-----:|:-----:|
|
|------|-------------|:----:|:-----:|:-----:|
|
||||||
| evaluation_delay | Delay in seconds for the metric evaluation | string | `900` | no |
|
| delay | Delay in seconds for the metric evaluation | string | `900` | no |
|
||||||
| environment | Environment | string | - | yes |
|
| environment | Environment | string | - | yes |
|
||||||
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | no |
|
| filter_tags_use_defaults | Use default filter tags convention | string | `true` | 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 |
|
||||||
|
|||||||
@ -4,7 +4,7 @@ variable "environment" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Global DataDog
|
# Global DataDog
|
||||||
variable "evaluation_delay" {
|
variable "delay" {
|
||||||
description = "Delay in seconds for the metric evaluation"
|
description = "Delay in seconds for the metric evaluation"
|
||||||
default = 900
|
default = 900
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ data "template_file" "filter" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "datadog_monitor" "mysql_connection_too_high" {
|
resource "datadog_monitor" "mysql_connection_too_high" {
|
||||||
name = "[${var.environment}] Mysql Connections {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)"
|
name = "[${var.environment}] Mysql Connections {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||||
message = "${coalesce(var.mysql_connection_message, var.message)}"
|
message = "${coalesce(var.mysql_connection_message, var.message)}"
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|
||||||
@ -18,8 +18,8 @@ resource "datadog_monitor" "mysql_connection_too_high" {
|
|||||||
) * 100 > ${var.mysql_connection_threshold_critical}
|
) * 100 > ${var.mysql_connection_threshold_critical}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
evaluation_delay = "${var.evaluation_delay}"
|
evaluation_delay = "${var.delay}"
|
||||||
new_host_delay = "${var.evaluation_delay}"
|
new_host_delay = "${var.delay}"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
warning = "${var.mysql_connection_threshold_warning}"
|
warning = "${var.mysql_connection_threshold_warning}"
|
||||||
@ -38,7 +38,7 @@ resource "datadog_monitor" "mysql_connection_too_high" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "datadog_monitor" "mysql_thread_too_high" {
|
resource "datadog_monitor" "mysql_thread_too_high" {
|
||||||
name = "[${var.environment}] Mysql threads {{comparator}} {{#is_alert}}{{threshold}}%{{/is_alert}}{{#is_warning}}{{warn_threshold}}%{{/is_warning}} ({{value}}%)"
|
name = "[${var.environment}] Mysql threads {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}"
|
||||||
message = "${coalesce(var.mysql_thread_message, var.message)}"
|
message = "${coalesce(var.mysql_thread_message, var.message)}"
|
||||||
type = "metric alert"
|
type = "metric alert"
|
||||||
|
|
||||||
@ -48,8 +48,8 @@ resource "datadog_monitor" "mysql_thread_too_high" {
|
|||||||
) > ${var.mysql_thread_threshold_critical}
|
) > ${var.mysql_thread_threshold_critical}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
evaluation_delay = "${var.evaluation_delay}"
|
evaluation_delay = "${var.delay}"
|
||||||
new_host_delay = "${var.evaluation_delay}"
|
new_host_delay = "${var.delay}"
|
||||||
|
|
||||||
thresholds {
|
thresholds {
|
||||||
warning = "${var.mysql_thread_threshold_warning}"
|
warning = "${var.mysql_thread_threshold_warning}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user