resource "datadog_monitor" "redis_cache_hits" { count = "${var.cache_hits_enabled == "true" ? 1 : 0}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Elasticache redis cache hit ratio {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.cache_hits_message, var.message)}" type = "query alert" query = < ${var.cpu_high_threshold_critical} EOQ notify_no_data = true evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false new_host_delay = "${var.new_host_delay}" tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache-redis", "team:claranet", "created-by:terraform", "engine:redis", "${var.cpu_high_extra_tags}"] } resource "datadog_monitor" "redis_replication_lag" { count = "${var.replication_lag_enabled == "true" ? 1 : 0}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Elasticache redis replication lag {{#is_alert}}{{{comparator}}} {{threshold}}s ({{value}}s){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}s ({{value}}s){{/is_warning}}" message = "${coalesce(var.replication_lag_message, var.message)}" type = "query alert" query = < ${var.replication_lag_threshold_critical} EOQ thresholds { warning = "${var.replication_lag_threshold_warning}" critical = "${var.replication_lag_threshold_critical}" } notify_no_data = false evaluation_delay = "${var.evaluation_delay}" renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false new_host_delay = "${var.new_host_delay}" tags = ["env:${var.environment}", "type:cloud", "provider:aws", "resource:elasticache-redis", "team:claranet", "created-by:terraform", "engine:redis", "${var.replication_lag_extra_tags}"] } resource "datadog_monitor" "redis_commands" { count = "${var.commands_enabled == "true" ? 1 : 0}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Elasticache redis is receiving no commands" message = "${coalesce(var.commands_message, var.message)}" type = "query alert" query = <