resource "datadog_monitor" "eventhub_status" { count = "${var.status_enabled == "true" ? 1 : 0}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Event Hub is down" message = "${coalesce(var.status_message, var.message)}" query = < ${var.failed_requests_rate_thresold_critical} EOQ type = "metric alert" thresholds { critical = "${var.failed_requests_rate_thresold_critical}" warning = "${var.failed_requests_rate_thresold_warning}" } silenced = "${var.failed_requests_rate_silenced}" 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:azure", "resource:eventhub", "team:claranet", "created-by:terraform", "${var.failed_requests_rate_extra_tags}"] } resource "datadog_monitor" "eventhub_errors" { count = "${var.errors_rate_enabled == "true" ? 1 : 0}" name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] Event Hub too many errors {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = "${coalesce(var.errors_rate_message, var.message)}" query = < ${var.errors_rate_thresold_critical} EOQ type = "metric alert" thresholds { critical = "${var.errors_rate_thresold_critical}" warning = "${var.errors_rate_thresold_warning}" } silenced = "${var.errors_rate_silenced}" 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:azure", "resource:eventhub", "team:claranet", "created-by:terraform", "${var.errors_rate_extra_tags}"] }