MON-142 add extra tags
This commit is contained in:
parent
e7c21f49ab
commit
f8ea23eaf4
@ -28,10 +28,12 @@ Creates DataDog monitors with the following checks:
|
|||||||
| 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 |
|
||||||
|
| mysql_connection_extra_tags | Extra tags for MySQL connection monitor | list | `<list>` | no |
|
||||||
| mysql_connection_message | Custom message for MySQL connection monitor | string | `` | no |
|
| mysql_connection_message | Custom message for MySQL connection monitor | string | `` | no |
|
||||||
| mysql_connection_silenced | Groups to mute mysql connection monitor | map | `<map>` | no |
|
| mysql_connection_silenced | Groups to mute mysql connection monitor | map | `<map>` | no |
|
||||||
| mysql_connection_threshold_critical | Maximum critical acceptable percent of connections | string | `80` | no |
|
| mysql_connection_threshold_critical | Maximum critical acceptable percent of connections | string | `80` | no |
|
||||||
| mysql_connection_threshold_warning | Maximum warning acceptable percent of connections | string | `70` | no |
|
| mysql_connection_threshold_warning | Maximum warning acceptable percent of connections | string | `70` | no |
|
||||||
|
| mysql_thread_extra_tags | Extra tags for MySQL thread monitor | list | `<list>` | no |
|
||||||
| mysql_thread_message | Custom message for MySQL thread monitor | string | `` | no |
|
| mysql_thread_message | Custom message for MySQL thread monitor | string | `` | no |
|
||||||
| mysql_thread_silenced | Groups to mute mysql threads monitor | map | `<map>` | no |
|
| mysql_thread_silenced | Groups to mute mysql threads monitor | map | `<map>` | no |
|
||||||
| mysql_thread_threshold_critical | Maximum critical acceptable number of threads | string | `500` | no |
|
| mysql_thread_threshold_critical | Maximum critical acceptable number of threads | string | `500` | no |
|
||||||
|
|||||||
@ -54,6 +54,12 @@ variable "mysql_connection_message" {
|
|||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "mysql_connection_extra_tags" {
|
||||||
|
description = "Extra tags for MySQL connection monitor"
|
||||||
|
type = "list"
|
||||||
|
default = []
|
||||||
|
}
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
### MySQL threads ###
|
### MySQL threads ###
|
||||||
#################################
|
#################################
|
||||||
@ -79,3 +85,9 @@ variable "mysql_thread_message" {
|
|||||||
type = "string"
|
type = "string"
|
||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "mysql_thread_extra_tags" {
|
||||||
|
description = "Extra tags for MySQL thread monitor"
|
||||||
|
type = "list"
|
||||||
|
default = []
|
||||||
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ resource "datadog_monitor" "mysql_connection_too_high" {
|
|||||||
critical = "${var.mysql_connection_threshold_critical}"
|
critical = "${var.mysql_connection_threshold_critical}"
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_no_data = true
|
notify_no_data = false
|
||||||
renotify_interval = 0
|
renotify_interval = 0
|
||||||
require_full_window = true
|
require_full_window = true
|
||||||
timeout_h = 0
|
timeout_h = 0
|
||||||
@ -26,7 +26,7 @@ resource "datadog_monitor" "mysql_connection_too_high" {
|
|||||||
|
|
||||||
silenced = "${var.mysql_connection_silenced}"
|
silenced = "${var.mysql_connection_silenced}"
|
||||||
|
|
||||||
tags = ["env:${var.environment}", "resource:mysql"]
|
tags = ["env:${var.environment}", "type:database", "provider:mysql", "resource:mysql", "team:claranet", "created-by:terraform", "${var.mysql_connection_extra_tags}"]
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "datadog_monitor" "mysql_thread_too_high" {
|
resource "datadog_monitor" "mysql_thread_too_high" {
|
||||||
@ -48,7 +48,7 @@ resource "datadog_monitor" "mysql_thread_too_high" {
|
|||||||
critical = "${var.mysql_thread_threshold_critical}"
|
critical = "${var.mysql_thread_threshold_critical}"
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_no_data = true
|
notify_no_data = false
|
||||||
renotify_interval = 0
|
renotify_interval = 0
|
||||||
require_full_window = true
|
require_full_window = true
|
||||||
timeout_h = 0
|
timeout_h = 0
|
||||||
@ -56,5 +56,5 @@ resource "datadog_monitor" "mysql_thread_too_high" {
|
|||||||
|
|
||||||
silenced = "${var.mysql_thread_silenced}"
|
silenced = "${var.mysql_thread_silenced}"
|
||||||
|
|
||||||
tags = ["env:${var.environment}", "resource:mysql"]
|
tags = ["env:${var.environment}", "type:database", "provider:mysql", "resource:mysql", "team:claranet", "created-by:terraform", "${var.mysql_thread_extra_tags}"]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user