diff --git a/cloud/azure/storage/monitors-azure-storage.tf b/cloud/azure/storage/monitors-azure-storage.tf index 64f3286..e2b115e 100644 --- a/cloud/azure/storage/monitors-azure-storage.tf +++ b/cloud/azure/storage/monitors-azure-storage.tf @@ -11,7 +11,9 @@ resource "datadog_monitor" "availability" { message = "${var.message}" query = < ${var.latency_threshold_critical} + max(last_5m): ( + avg:azure.storage.average_e2_e_latency{${data.template_file.filter.rendered}} by {resource_group,storage_type,name} + ) > ${var.latency_threshold_critical} EOF thresholds { @@ -92,7 +98,9 @@ resource "datadog_monitor" "timeout_error_requests" { message = "${var.message}" query = < ${var.timeout_error_requests_threshold_critical} + avg(last_5m): ( + avg:azure.storage.percent_timeout_error{${data.template_file.filter.rendered}} by {resource_group,storage_type,name} + ) > ${var.timeout_error_requests_threshold_critical} EOF thresholds { @@ -120,7 +128,9 @@ resource "datadog_monitor" "network_error_requests" { message = "${var.message}" query = < ${var.network_error_requests_threshold_critical} + avg(last_5m): ( + avg:azure.storage.percent_network_error{${data.template_file.filter.rendered}} by {resource_group,storage_type,name} + ) > ${var.network_error_requests_threshold_critical} EOF thresholds { @@ -148,7 +158,9 @@ resource "datadog_monitor" "throttling_error_requests" { message = "${var.message}" query = < ${var.throttling_error_requests_threshold_critical} + avg(last_5m): ( + avg:azure.storage.percent_throttling_error{${data.template_file.filter.rendered}} by {resource_group,storage_type,name} + ) > ${var.throttling_error_requests_threshold_critical} EOF thresholds { @@ -176,7 +188,9 @@ resource "datadog_monitor" "server_other_error_requests" { message = "${var.message}" query = < ${var.server_other_error_requests_threshold_critical} + avg(last_5m): ( + avg:azure.storage.percent_server_other_error{${data.template_file.filter.rendered}} by {resource_group,storage_type,name} + ) > ${var.server_other_error_requests_threshold_critical} EOF thresholds { @@ -204,7 +218,9 @@ resource "datadog_monitor" "client_other_error_requests" { message = "${var.message}" query = < ${var.client_other_error_requests_threshold_critical} + avg(last_5m): ( + avg:azure.storage.percent_client_other_error{${data.template_file.filter.rendered}} by {resource_group,storage_type,name} + ) > ${var.client_other_error_requests_threshold_critical} EOF thresholds { @@ -232,7 +248,9 @@ resource "datadog_monitor" "authorization_error_requests" { message = "${var.message}" query = < ${var.authorization_error_requests_threshold_critical} + avg(last_5m): ( + avg:azure.storage.percent_authorization_error{${data.template_file.filter.rendered}} by {resource_group,storage_type,name} + ) > ${var.authorization_error_requests_threshold_critical} EOF thresholds {