resource "datadog_monitor" "status" { count = var.status_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Redis {{name}} is down" message = coalesce(var.status_message, var.message) type = "query alert" query = < ${var.evictedkeys_limit_threshold_critical} EOQ thresholds = { warning = var.evictedkeys_limit_threshold_warning critical = var.evictedkeys_limit_threshold_critical } evaluation_delay = var.evaluation_delay new_host_delay = var.new_host_delay notify_no_data = false renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:redis", "team:claranet", "created-by:terraform", var.evictedkeys_limit_extra_tags] } resource "datadog_monitor" "percent_processor_time" { count = var.percent_processor_time_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Redis processor time too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = coalesce(var.percent_processor_time_message, var.message) type = "query alert" query = < ${var.percent_processor_time_threshold_critical} EOQ thresholds = { warning = var.percent_processor_time_threshold_warning critical = var.percent_processor_time_threshold_critical } evaluation_delay = var.evaluation_delay new_host_delay = var.new_host_delay notify_no_data = false renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:redis", "team:claranet", "created-by:terraform", var.percent_processor_time_extra_tags] } resource "datadog_monitor" "server_load" { count = var.server_load_rate_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Redis server load too high {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = coalesce(var.server_load_rate_message, var.message) type = "query alert" query = < ${var.server_load_rate_threshold_critical} EOQ thresholds = { warning = var.server_load_rate_threshold_warning critical = var.server_load_rate_threshold_critical } evaluation_delay = var.evaluation_delay new_host_delay = var.new_host_delay notify_no_data = false renotify_interval = 0 notify_audit = false timeout_h = 0 include_tags = true locked = false require_full_window = false tags = ["env:${var.environment}", "type:cloud", "provider:azure", "resource:redis", "team:claranet", "created-by:terraform", var.server_load_rate_extra_tags] }