Merge branch 'MN-584_gcp_sql_failover_only_master' into 'master'
MN-584: Google Cloud SQL Failover Unavailable monitor is only useful for instances with master role Closes MN-584 See merge request claranet/projects/monitoring/datadog/terraform/monitors!179
This commit is contained in:
commit
347cac27bc
@ -71,6 +71,7 @@ Creates DataDog monitors with the following checks:
|
|||||||
| failover\_unavailable\_time\_aggregator | Time aggreggator for the Failover Unavailable monitor | `string` | `"max"` | no |
|
| failover\_unavailable\_time\_aggregator | Time aggreggator for the Failover Unavailable monitor | `string` | `"max"` | no |
|
||||||
| failover\_unavailable\_timeframe | Timeframe for the Failover Unavailable monitor | `string` | `"last_10m"` | no |
|
| failover\_unavailable\_timeframe | Timeframe for the Failover Unavailable monitor | `string` | `"last_10m"` | no |
|
||||||
| filter\_tags | Tags used for filtering | `string` | `"*"` | no |
|
| filter\_tags | Tags used for filtering | `string` | `"*"` | no |
|
||||||
|
| filter\_tags\_failover\_unavailable | Tags used for filtering specific to the failover unavailable monitor which is only useful for master instances | `string` | `""` | no |
|
||||||
| memory\_utilization\_enabled | Flag to enable GCP Cloud SQL Memory Utilization monitor | `string` | `"true"` | no |
|
| memory\_utilization\_enabled | Flag to enable GCP Cloud SQL Memory Utilization monitor | `string` | `"true"` | no |
|
||||||
| memory\_utilization\_extra\_tags | Extra tags for GCP Cloud SQL Memory Utilization monitor | `list(string)` | `[]` | no |
|
| memory\_utilization\_extra\_tags | Extra tags for GCP Cloud SQL Memory Utilization monitor | `list(string)` | `[]` | no |
|
||||||
| memory\_utilization\_forecast\_algorithm | Algorithm for the Memory Utilization Forecast monitor | `string` | `"linear"` | no |
|
| memory\_utilization\_forecast\_algorithm | Algorithm for the Memory Utilization Forecast monitor | `string` | `"linear"` | no |
|
||||||
|
|||||||
@ -11,6 +11,11 @@ variable "filter_tags" {
|
|||||||
default = "*"
|
default = "*"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "filter_tags_failover_unavailable" {
|
||||||
|
description = "Tags used for filtering specific to the failover unavailable monitor which is only useful for master instances"
|
||||||
|
default = ""
|
||||||
|
}
|
||||||
|
|
||||||
variable "message" {
|
variable "message" {
|
||||||
description = "Message sent when a monitor is triggered"
|
description = "Message sent when a monitor is triggered"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -209,7 +209,7 @@ resource "datadog_monitor" "failover_unavailable" {
|
|||||||
|
|
||||||
query = <<EOQ
|
query = <<EOQ
|
||||||
${var.failover_unavailable_time_aggregator}(${var.failover_unavailable_timeframe}):
|
${var.failover_unavailable_time_aggregator}(${var.failover_unavailable_timeframe}):
|
||||||
avg:gcp.cloudsql.database.available_for_failover{${var.filter_tags}}
|
avg:gcp.cloudsql.database.available_for_failover{${join(", ", compact([var.filter_tags_failover_unavailable, var.filter_tags_failover_unavailable != "" && var.filter_tags == "*" ? "" : var.filter_tags]))}}
|
||||||
by {database_id}
|
by {database_id}
|
||||||
<= ${var.failover_unavailable_threshold_critical}
|
<= ${var.failover_unavailable_threshold_critical}
|
||||||
EOQ
|
EOQ
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user