change variable for rds & added missing inputs variables
This commit is contained in:
parent
c7f30a1e87
commit
f634708ab9
18
inputs.tf
18
inputs.tf
@ -8,10 +8,24 @@ variable "dd_linux_basics" {
|
||||
variable "dd_custom_cpu" {
|
||||
type = "map"
|
||||
default = {
|
||||
status = "enabled"
|
||||
status = "disabled"
|
||||
}
|
||||
}
|
||||
variable "dd_custom_memory" {
|
||||
type = "map"
|
||||
default = {
|
||||
status = "disabled"
|
||||
}
|
||||
}
|
||||
|
||||
variable "rds-mysql_basics" {
|
||||
|
||||
variable "dd_rds_mysql_basics" {
|
||||
default = "disabled"
|
||||
}
|
||||
variable "dd_custom_rds-mysql" {
|
||||
type = "map"
|
||||
default = {
|
||||
status = "disabled"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
resource "datadog_monitor" "rds-mysql_cpu_80_15min" {
|
||||
name = "RDS Mysql CPU High > 90% for 15 min"
|
||||
message = "{{#is_alert}}\n${var.critical_escalation_group} \n{{/is_alert}} \n{{#is_recovery}}\n${var.critical_escalation_group}\n{{/is_recovery}}\n{{#is_warning}}\n${var.warning_escalation_group} \n{{/is_warning}} \n{{#is_warning_recovery}}\n${var.warning_escalation_group}\n{{/is_warning_recovery}}"
|
||||
count = "${var.rds-mysql_basics == "true" ? 1 : 0 }"
|
||||
count = "${var.dd_rds-mysql_basics == "enabled" ? 1 : 0 }"
|
||||
|
||||
query = "avg(last_15m):aws.rds.cpuutilization.total{\"dd_monitoring:enabled\",\"dd_rds-mysql_basics:enabled\",\"!dd_custom_rds-mysql:enabled\"} by {host} > 90"
|
||||
type = "query alert"
|
||||
@ -34,7 +34,7 @@ resource "datadog_monitor" "mysql_rds_free_space_low" {
|
||||
|
||||
type = "service check"
|
||||
query = "avg(last_10m): 1 - avg:aws.rds.free_storage_space{\"dd_monitoring:enabled\",\"dd_rds-mysql_basics:enabled\",\"!dd_custom_rds-mysql:enabled\"} by {host} / ( avg:aws.rds.total_storage_space{\"dd_monitoring:enabled\",\"dd_rds-mysql_basics:enabled\",\"!dd_custom_rds-mysql:enabled\"} by {host} - avg:aws.rds.free_storage_space{} by {host} ) < 0.1"
|
||||
count = "${var.rds-mysql_basics == "true" ? 1 : 0 }"
|
||||
count = "${var.dd_rds-mysql_basics == "enabled" ? 1 : 0 }"
|
||||
|
||||
thresholds {
|
||||
warning = 0.2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user