Merge branch 'MON-531_Add_time_aggregator_on_replica_lag_monitor' into 'master'
MON-531: Add replicalag time aggregator input variable Closes MON-531 See merge request claranet/pt-monitoring/projects/datadog/terraform/monitors!139
This commit is contained in:
commit
decddd57bd
@ -27,6 +27,7 @@ Creates DataDog monitors with the following checks:
|
|||||||
| aurora\_replicalag\_message | Custom message for RDS Aurora replica lag monitor | string | `""` | no |
|
| aurora\_replicalag\_message | Custom message for RDS Aurora replica lag monitor | string | `""` | no |
|
||||||
| aurora\_replicalag\_threshold\_critical | Aurora replica lag in milliseconds (critical threshold) | string | `"200"` | no |
|
| aurora\_replicalag\_threshold\_critical | Aurora replica lag in milliseconds (critical threshold) | string | `"200"` | no |
|
||||||
| aurora\_replicalag\_threshold\_warning | Aurora replica lag in milliseconds (warning threshold) | string | `"100"` | no |
|
| aurora\_replicalag\_threshold\_warning | Aurora replica lag in milliseconds (warning threshold) | string | `"100"` | no |
|
||||||
|
| aurora\_replicalag\_time\_aggregator | Monitor aggregator for RDS Aurora replica lag [available values: min, max or avg] | string | `"min"` | no |
|
||||||
| aurora\_replicalag\_timeframe | Monitor timeframe for RDS Aurora replica lag monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
|
| aurora\_replicalag\_timeframe | Monitor timeframe for RDS Aurora replica lag monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
|
||||||
| environment | Architecture Environment | string | n/a | yes |
|
| environment | Architecture Environment | string | n/a | yes |
|
||||||
| evaluation\_delay | Delay in seconds for the metric evaluation | string | `"900"` | no |
|
| evaluation\_delay | Delay in seconds for the metric evaluation | string | `"900"` | no |
|
||||||
@ -45,3 +46,6 @@ Creates DataDog monitors with the following checks:
|
|||||||
|
|
||||||
## Related documentation
|
## Related documentation
|
||||||
|
|
||||||
|
DataDog documentation: [https://docs.datadoghq.com/integrations/amazon_rds/](https://docs.datadoghq.com/integrations/amazon_rds/)
|
||||||
|
|
||||||
|
AWS RDS Instance metrics documentation: [https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MonitoringOverview.html#monitoring-cloudwatch](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MonitoringOverview.html#monitoring-cloudwatch)
|
||||||
|
|||||||
@ -59,6 +59,12 @@ variable "aurora_replicalag_message" {
|
|||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "aurora_replicalag_time_aggregator" {
|
||||||
|
description = "Monitor aggregator for RDS Aurora replica lag [available values: min, max or avg]"
|
||||||
|
type = string
|
||||||
|
default = "min"
|
||||||
|
}
|
||||||
|
|
||||||
variable "aurora_replicalag_timeframe" {
|
variable "aurora_replicalag_timeframe" {
|
||||||
description = "Monitor timeframe for RDS Aurora replica lag monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
description = "Monitor timeframe for RDS Aurora replica lag monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||||
type = string
|
type = string
|
||||||
@ -74,4 +80,3 @@ variable "aurora_replicalag_threshold_critical" {
|
|||||||
description = "Aurora replica lag in milliseconds (critical threshold)"
|
description = "Aurora replica lag in milliseconds (critical threshold)"
|
||||||
default = "200"
|
default = "200"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ resource "datadog_monitor" "rds_aurora_mysql_replica_lag" {
|
|||||||
type = "query alert"
|
type = "query alert"
|
||||||
|
|
||||||
query = <<EOQ
|
query = <<EOQ
|
||||||
avg(${var.aurora_replicalag_timeframe}): (
|
${var.aurora_replicalag_time_aggregator}(${var.aurora_replicalag_timeframe}): (
|
||||||
avg:aws.rds.aurora_replica_lag${module.filter-tags.query_alert} by {region,name}
|
avg:aws.rds.aurora_replica_lag${module.filter-tags.query_alert} by {region,name}
|
||||||
) > ${var.aurora_replicalag_threshold_critical}
|
) > ${var.aurora_replicalag_threshold_critical}
|
||||||
EOQ
|
EOQ
|
||||||
|
|||||||
@ -27,6 +27,7 @@ Creates DataDog monitors with the following checks:
|
|||||||
| aurora\_replicalag\_message | Custom message for RDS Aurora replica lag monitor | string | `""` | no |
|
| aurora\_replicalag\_message | Custom message for RDS Aurora replica lag monitor | string | `""` | no |
|
||||||
| aurora\_replicalag\_threshold\_critical | Aurora replica lag in milliseconds (critical threshold) | string | `"200"` | no |
|
| aurora\_replicalag\_threshold\_critical | Aurora replica lag in milliseconds (critical threshold) | string | `"200"` | no |
|
||||||
| aurora\_replicalag\_threshold\_warning | Aurora replica lag in milliseconds (warning threshold) | string | `"100"` | no |
|
| aurora\_replicalag\_threshold\_warning | Aurora replica lag in milliseconds (warning threshold) | string | `"100"` | no |
|
||||||
|
| aurora\_replicalag\_time\_aggregator | Monitor aggregator for RDS Aurora replica lag [available values: min, max or avg] | string | `"min"` | no |
|
||||||
| aurora\_replicalag\_timeframe | Monitor timeframe for RDS Aurora replica lag monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
|
| aurora\_replicalag\_timeframe | Monitor timeframe for RDS Aurora replica lag monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
|
||||||
| environment | Architecture Environment | string | n/a | yes |
|
| environment | Architecture Environment | string | n/a | yes |
|
||||||
| evaluation\_delay | Delay in seconds for the metric evaluation | string | `"900"` | no |
|
| evaluation\_delay | Delay in seconds for the metric evaluation | string | `"900"` | no |
|
||||||
@ -45,3 +46,6 @@ Creates DataDog monitors with the following checks:
|
|||||||
|
|
||||||
## Related documentation
|
## Related documentation
|
||||||
|
|
||||||
|
DataDog documentation: [https://docs.datadoghq.com/integrations/amazon_rds/](https://docs.datadoghq.com/integrations/amazon_rds/)
|
||||||
|
|
||||||
|
AWS RDS Instance metrics documentation: [https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MonitoringOverview.html#monitoring-cloudwatch](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MonitoringOverview.html#monitoring-cloudwatch)
|
||||||
|
|||||||
@ -59,6 +59,12 @@ variable "aurora_replicalag_message" {
|
|||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "aurora_replicalag_time_aggregator" {
|
||||||
|
description = "Monitor aggregator for RDS Aurora replica lag [available values: min, max or avg]"
|
||||||
|
type = string
|
||||||
|
default = "min"
|
||||||
|
}
|
||||||
|
|
||||||
variable "aurora_replicalag_timeframe" {
|
variable "aurora_replicalag_timeframe" {
|
||||||
description = "Monitor timeframe for RDS Aurora replica lag monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
description = "Monitor timeframe for RDS Aurora replica lag monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||||
type = string
|
type = string
|
||||||
@ -74,4 +80,3 @@ variable "aurora_replicalag_threshold_critical" {
|
|||||||
description = "Aurora replica lag in milliseconds (critical threshold)"
|
description = "Aurora replica lag in milliseconds (critical threshold)"
|
||||||
default = "200"
|
default = "200"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ resource "datadog_monitor" "rds_aurora_postgresql_replica_lag" {
|
|||||||
type = "query alert"
|
type = "query alert"
|
||||||
|
|
||||||
query = <<EOQ
|
query = <<EOQ
|
||||||
avg(${var.aurora_replicalag_timeframe}): (
|
${var.aurora_replicalag_time_aggregator}(${var.aurora_replicalag_timeframe}): (
|
||||||
avg:aws.rds.rdsto_aurora_postgre_sqlreplica_lag${module.filter-tags.query_alert} by {region,name}
|
avg:aws.rds.rdsto_aurora_postgre_sqlreplica_lag${module.filter-tags.query_alert} by {region,name}
|
||||||
) > ${var.aurora_replicalag_threshold_critical}
|
) > ${var.aurora_replicalag_threshold_critical}
|
||||||
EOQ
|
EOQ
|
||||||
|
|||||||
@ -51,6 +51,7 @@ Creates DataDog monitors with the following checks:
|
|||||||
| replicalag\_message | Custom message for RDS replica lag monitor | string | `""` | no |
|
| replicalag\_message | Custom message for RDS replica lag monitor | string | `""` | no |
|
||||||
| replicalag\_threshold\_critical | replica lag in seconds (critical threshold) | string | `"300"` | no |
|
| replicalag\_threshold\_critical | replica lag in seconds (critical threshold) | string | `"300"` | no |
|
||||||
| replicalag\_threshold\_warning | replica lag in seconds (warning threshold) | string | `"200"` | no |
|
| replicalag\_threshold\_warning | replica lag in seconds (warning threshold) | string | `"200"` | no |
|
||||||
|
| replicalag\_time\_aggregator | Monitor aggregator for RDS replica lag [available values: min, max or avg] | string | `"min"` | no |
|
||||||
| replicalag\_timeframe | Monitor timeframe for RDS replica lag monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
|
| replicalag\_timeframe | Monitor timeframe for RDS replica lag monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`] | string | `"last_5m"` | no |
|
||||||
|
|
||||||
## Outputs
|
## Outputs
|
||||||
@ -65,5 +66,4 @@ Creates DataDog monitors with the following checks:
|
|||||||
|
|
||||||
DataDog documentation: [https://docs.datadoghq.com/integrations/amazon_rds/](https://docs.datadoghq.com/integrations/amazon_rds/)
|
DataDog documentation: [https://docs.datadoghq.com/integrations/amazon_rds/](https://docs.datadoghq.com/integrations/amazon_rds/)
|
||||||
|
|
||||||
AWS RDS Instance metrics documentation: [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/rds-metricscollected.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/rds-metricscollected.html)
|
AWS RDS Instance metrics documentation: [https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MonitoringOverview.html#monitoring-cloudwatch](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/MonitoringOverview.html#monitoring-cloudwatch)
|
||||||
|
|
||||||
|
|||||||
@ -139,6 +139,12 @@ variable "replicalag_message" {
|
|||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "replicalag_time_aggregator" {
|
||||||
|
description = "Monitor aggregator for RDS replica lag [available values: min, max or avg]"
|
||||||
|
type = string
|
||||||
|
default = "min"
|
||||||
|
}
|
||||||
|
|
||||||
variable "replicalag_timeframe" {
|
variable "replicalag_timeframe" {
|
||||||
description = "Monitor timeframe for RDS replica lag monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
description = "Monitor timeframe for RDS replica lag monitor [available values: `last_#m` (1, 5, 10, 15, or 30), `last_#h` (1, 2, or 4), or `last_1d`]"
|
||||||
type = string
|
type = string
|
||||||
@ -154,4 +160,3 @@ variable "replicalag_threshold_critical" {
|
|||||||
description = "replica lag in seconds (critical threshold)"
|
description = "replica lag in seconds (critical threshold)"
|
||||||
default = "300"
|
default = "300"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,7 @@ resource "datadog_monitor" "rds_replica_lag" {
|
|||||||
type = "query alert"
|
type = "query alert"
|
||||||
|
|
||||||
query = <<EOQ
|
query = <<EOQ
|
||||||
avg(${var.replicalag_timeframe}): (
|
${var.replicalag_time_aggregator}(${var.replicalag_timeframe}): (
|
||||||
avg:aws.rds.replica_lag${module.filter-tags.query_alert} by {region,name}
|
avg:aws.rds.replica_lag${module.filter-tags.query_alert} by {region,name}
|
||||||
) > ${var.replicalag_threshold_critical}
|
) > ${var.replicalag_threshold_critical}
|
||||||
EOQ
|
EOQ
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user