MON-224 Readme and replication lag timeframe variable fixed

This commit is contained in:
Rafael Romero Carmona 2018-07-05 12:52:03 +02:00 committed by Quentin Manfroi
parent 5899608023
commit 82c35ce5f7
2 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@ How to use this module
``` ```
module "datadog-monitors-gcp-cloudsql-mysql" { module "datadog-monitors-gcp-cloudsql-mysql" {
source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//cloud/gcp/clouds-sql/mysql?ref={revision}" source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//cloud/gcp/cloud-sql/mysql?ref={revision}"
project_id = "${var.gcp_project_id}" project_id = "${var.gcp_project_id}"
environment = "${var.environment}" environment = "${var.environment}"
@ -21,7 +21,8 @@ Creates DataDog monitors with the following checks :
* CloudSQL MySQL Network Connections * CloudSQL MySQL Network Connections
* CloudSQL MySQL Replication Lag * CloudSQL MySQL Replication Lag
* CloudSQL MySQL Failover Lag * CloudSQL MySQL Queries Changing Anomaly (not created by default)
* CloudSQL MySQL Questions Changing Anomaly (not created by default)
Useful links Useful links
------------ ------------

View File

@ -62,7 +62,7 @@ resource "datadog_monitor" "replication_lag" {
type = "metric alert" type = "metric alert"
query = <<EOF query = <<EOF
min(last_10m): min(${var.replication_lag_timeframe}):
avg:gcp.cloudsql.database.mysql.replication.seconds_behind_master{${data.template_file.filter.rendered}} avg:gcp.cloudsql.database.mysql.replication.seconds_behind_master{${data.template_file.filter.rendered}}
by {database_id} by {database_id}
> ${var.replication_lag_threshold_critical} > ${var.replication_lag_threshold_critical}