resource "datadog_monitor" "too_many_jobs_failed" { count = var.failed_jobs_rate_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] IOT Hub Too many jobs failed {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = coalesce(var.failed_jobs_rate_message, var.message) type = "query alert" query = < ${var.failed_jobs_rate_threshold_critical} EOQ thresholds = { warning = var.failed_jobs_rate_threshold_warning critical = var.failed_jobs_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 = 1 include_tags = true locked = false require_full_window = false tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"], var.failed_jobs_rate_extra_tags) } resource "datadog_monitor" "too_many_list_jobs_failed" { count = var.failed_listjobs_rate_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] IOT Hub Too many list_jobs failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = coalesce(var.failed_listjobs_rate_message, var.message) type = "query alert" query = < ${var.failed_listjobs_rate_threshold_critical} EOQ thresholds = { warning = var.failed_listjobs_rate_threshold_warning critical = var.failed_listjobs_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 = 1 include_tags = true locked = false require_full_window = false tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"], var.failed_listjobs_rate_extra_tags) } resource "datadog_monitor" "too_many_query_jobs_failed" { count = var.failed_queryjobs_rate_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] IOT Hub Too many query_jobs failed {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = coalesce(var.failed_queryjobs_rate_message, var.message) type = "query alert" query = < ${var.failed_queryjobs_rate_threshold_critical} EOQ thresholds = { warning = var.failed_queryjobs_rate_threshold_warning critical = var.failed_queryjobs_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 = 1 include_tags = true locked = false require_full_window = false tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"], var.failed_queryjobs_rate_extra_tags) } resource "datadog_monitor" "status" { count = var.status_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] IOT Hub is down" message = coalesce(var.status_message, var.message) type = "query alert" query = < ${var.failed_c2d_methods_rate_threshold_critical} EOQ thresholds = { warning = var.failed_c2d_methods_rate_threshold_warning critical = var.failed_c2d_methods_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 = 1 include_tags = true locked = false require_full_window = false tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"], var.failed_c2d_methods_rate_extra_tags) } resource "datadog_monitor" "too_many_c2d_twin_read_failed" { count = var.failed_c2d_twin_read_rate_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] IOT Hub Too many c2d twin read failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = coalesce(var.failed_c2d_twin_read_rate_message, var.message) type = "query alert" query = < ${var.failed_c2d_twin_read_rate_threshold_critical} EOQ thresholds = { warning = var.failed_c2d_twin_read_rate_threshold_warning critical = var.failed_c2d_twin_read_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 = 1 include_tags = true locked = false require_full_window = false tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"], var.failed_c2d_twin_read_rate_extra_tags) } resource "datadog_monitor" "too_many_c2d_twin_update_failed" { count = var.failed_c2d_twin_update_rate_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] IOT Hub Too many c2d twin update failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = coalesce(var.failed_c2d_twin_update_rate_message, var.message) type = "query alert" query = < ${var.failed_c2d_twin_update_rate_threshold_critical} EOQ thresholds = { warning = var.failed_c2d_twin_update_rate_threshold_warning critical = var.failed_c2d_twin_update_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 = 1 include_tags = true locked = false require_full_window = false tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"], var.failed_c2d_twin_update_rate_extra_tags) } resource "datadog_monitor" "too_many_d2c_twin_read_failed" { count = var.failed_d2c_twin_read_rate_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] IOT Hub Too many d2c twin read failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = coalesce(var.failed_d2c_twin_read_rate_message, var.message) type = "query alert" query = < ${var.failed_d2c_twin_read_rate_threshold_critical} EOQ thresholds = { warning = var.failed_d2c_twin_read_rate_threshold_warning critical = var.failed_d2c_twin_read_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 = 1 include_tags = true locked = false require_full_window = false tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"], var.failed_d2c_twin_read_rate_extra_tags) } resource "datadog_monitor" "too_many_d2c_twin_update_failed" { count = var.failed_d2c_twin_update_rate_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] IOT Hub Too many d2c twin update failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = coalesce(var.failed_d2c_twin_update_rate_message, var.message) type = "query alert" query = < ${var.failed_d2c_twin_update_rate_threshold_critical} EOQ thresholds = { warning = var.failed_d2c_twin_update_rate_threshold_warning critical = var.failed_d2c_twin_update_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 = 1 include_tags = true locked = false require_full_window = false tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"], var.failed_d2c_twin_update_rate_extra_tags) } resource "datadog_monitor" "too_many_d2c_telemetry_egress_dropped" { count = var.dropped_d2c_telemetry_egress_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] IOT Hub Too many d2c telemetry egress dropped {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = coalesce(var.dropped_d2c_telemetry_egress_message, var.message) type = "query alert" query = < ${var.dropped_d2c_telemetry_egress_rate_threshold_critical} EOQ thresholds = { warning = var.dropped_d2c_telemetry_egress_rate_threshold_warning critical = var.dropped_d2c_telemetry_egress_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 = 1 include_tags = true locked = false require_full_window = false tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"], var.dropped_d2c_telemetry_egress_extra_tags) } resource "datadog_monitor" "too_many_d2c_telemetry_egress_orphaned" { count = var.orphaned_d2c_telemetry_egress_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] IOT Hub Too many d2c telemetry egress orphaned {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = coalesce(var.orphaned_d2c_telemetry_egress_message, var.message) type = "query alert" query = < ${var.orphaned_d2c_telemetry_egress_rate_threshold_critical} EOQ thresholds = { warning = var.orphaned_d2c_telemetry_egress_rate_threshold_warning critical = var.orphaned_d2c_telemetry_egress_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 = 1 include_tags = true locked = false require_full_window = false tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"], var.orphaned_d2c_telemetry_egress_extra_tags) } resource "datadog_monitor" "too_many_d2c_telemetry_egress_invalid" { count = var.invalid_d2c_telemetry_egress_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] IOT Hub Too many d2c telemetry egress invalid {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = coalesce(var.invalid_d2c_telemetry_egress_message, var.message) type = "query alert" query = < ${var.invalid_d2c_telemetry_egress_rate_threshold_critical} EOQ thresholds = { warning = var.invalid_d2c_telemetry_egress_rate_threshold_warning critical = var.invalid_d2c_telemetry_egress_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 = 1 include_tags = true locked = false require_full_window = false tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"], var.invalid_d2c_telemetry_egress_extra_tags) } resource "datadog_monitor" "too_many_d2c_telemetry_ingress_nosent" { count = var.too_many_d2c_telemetry_ingress_nosent_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] IOT Hub Too many d2c telemetry ingress not sent {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = coalesce(var.too_many_d2c_telemetry_ingress_nosent_message, var.message) type = "query alert" query = < 0 EOQ evaluation_delay = var.evaluation_delay new_host_delay = var.new_host_delay notify_no_data = false renotify_interval = 0 notify_audit = false timeout_h = 1 include_tags = true locked = false require_full_window = false tags = concat(["env:${var.environment}", "type:cloud", "provider:azure", "resource:iothubs", "team:claranet", "created-by:terraform"], var.too_many_d2c_telemetry_ingress_nosent_extra_tags) }