resource "datadog_monitor" "proxysql_thread_worker" { count = var.proxysql_thread_worker_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] ProxySQL Thread Worker {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = coalesce(var.proxysql_thread_worker_message, var.message) type = "query alert" query = < ${var.proxysql_slow_threshold_critical} EOQ thresholds = { warning = var.proxysql_slow_threshold_warning critical = var.proxysql_slow_threshold_critical } evaluation_delay = var.evaluation_delay new_host_delay = var.new_host_delay notify_no_data = false renotify_interval = 0 require_full_window = true timeout_h = 0 include_tags = true tags = concat(["env:${var.environment}", "type:database", "provider:proxysql", "resource:proxysql", "team:claranet", "created-by:terraform"], var.proxysql_slow_extra_tags) lifecycle { ignore_changes = [silenced] } } resource "datadog_monitor" "proxysql_client_conn_aborted" { count = var.proxysql_client_conn_aborted_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] ProxySQL Client connections aborted {{#is_alert}}{{{comparator}}} {{threshold}} ({{value}}){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}} ({{value}}){{/is_warning}}" message = coalesce(var.proxysql_client_conn_aborted_message, var.message) type = "query alert" query = < ${var.proxysql_client_conn_aborted_threshold_critical} EOQ thresholds = { warning = var.proxysql_client_conn_aborted_threshold_warning critical = var.proxysql_client_conn_aborted_threshold_critical } evaluation_delay = var.evaluation_delay new_host_delay = var.new_host_delay notify_no_data = false renotify_interval = 0 require_full_window = true timeout_h = 0 include_tags = true tags = concat(["env:${var.environment}", "type:database", "provider:proxysql", "resource:proxysql", "team:claranet", "created-by:terraform"], var.proxysql_client_conn_aborted_extra_tags) lifecycle { ignore_changes = [silenced] } } resource "datadog_monitor" "proxysql_server_conn_aborted" { count = var.proxysql_server_conn_aborted_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] ProxySQL Server connections aborted {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = coalesce(var.proxysql_server_conn_aborted_message, var.message) type = "query alert" query = < ${var.proxysql_server_conn_aborted_threshold_critical} EOQ thresholds = { warning = var.proxysql_server_conn_aborted_threshold_warning critical = var.proxysql_server_conn_aborted_threshold_critical } evaluation_delay = var.evaluation_delay new_host_delay = var.new_host_delay notify_no_data = false renotify_interval = 0 require_full_window = true timeout_h = 0 include_tags = true tags = concat(["env:${var.environment}", "type:database", "provider:proxysql", "resource:proxysql", "team:claranet", "created-by:terraform"], var.proxysql_server_conn_aborted_extra_tags) lifecycle { ignore_changes = [silenced] } } resource "datadog_monitor" "proxysql_pool_conn_failure" { count = var.proxysql_pool_conn_failure_enabled == "true" ? 1 : 0 name = "${var.prefix_slug == "" ? "" : "[${var.prefix_slug}]"}[${var.environment}] ProxySQL Pool connections failure {{#is_alert}}{{{comparator}}} {{threshold}}% ({{value}}%){{/is_alert}}{{#is_warning}}{{{comparator}}} {{warn_threshold}}% ({{value}}%){{/is_warning}}" message = coalesce(var.proxysql_pool_conn_failure_message, var.message) type = "query alert" query = < ${var.proxysql_pool_conn_failure_threshold_critical} EOQ thresholds = { warning = var.proxysql_pool_conn_failure_threshold_warning critical = var.proxysql_pool_conn_failure_threshold_critical } evaluation_delay = var.evaluation_delay new_host_delay = var.new_host_delay notify_no_data = false renotify_interval = 0 require_full_window = true timeout_h = 0 include_tags = true tags = concat(["env:${var.environment}", "type:database", "provider:proxysql", "resource:proxysql", "team:claranet", "created-by:terraform"], var.proxysql_pool_conn_failure_extra_tags) lifecycle { ignore_changes = [silenced] } }