MON-78 Add EOF on querys

This commit is contained in:
Alexandre Gaillet 2017-10-31 14:41:14 +01:00
parent 1a278fc81c
commit 41997c9afe

View File

@ -10,7 +10,11 @@ resource "datadog_monitor" "su_utilization" {
name = "[${var.environment}] Streaming Units utilization at more than ${var.su_utilization_threshold_critical}% on {{name}}"
message = "${var.message}"
query = "avg(last_5m):avg:azure.streamanalytics_streamingjobs.resource_utilization{${data.template_file.filter.rendered}} by {name,resource_group} > ${var.su_utilization_threshold_critical}"
query = <<EOF
avg(last_5m): (
avg:azure.streamanalytics_streamingjobs.resource_utilization{${data.template_file.filter.rendered}} by {name,resource_group}
) > ${var.su_utilization_threshold_critical}
EOF
type = "query alert"
notify_no_data = "${var.notify_no_data}"
@ -33,7 +37,11 @@ resource "datadog_monitor" "failed_function_requests" {
name = "[${var.environment}] More than ${var.function_requests_threshold_critical} failed function requests on {{name}}"
message = "${var.message}"
query = "avg(last_5m):avg:azure.streamanalytics_streamingjobs.aml_callout_failed_requests{${data.template_file.filter.rendered}} by {name,resource_group} > ${var.function_requests_threshold_critical}"
query = <<EOF
avg(last_5m): (
avg:azure.streamanalytics_streamingjobs.aml_callout_failed_requests{${data.template_file.filter.rendered}} by {name,resource_group}
) > ${var.function_requests_threshold_critical}
EOF
type = "query alert"
notify_no_data = "${var.notify_no_data}"
@ -56,7 +64,11 @@ resource "datadog_monitor" "conversion_errors" {
name = "[${var.environment}] More than ${var.conversion_errors_threshold_critical} conversion errors on {{name}}"
message = "${var.message}"
query = "avg(last_5m):avg:azure.streamanalytics_streamingjobs.conversion_errors{${data.template_file.filter.rendered}} by {name,resource_group} > ${var.conversion_errors_threshold_critical}"
query = <<EOF
avg(last_5m): (
avg:azure.streamanalytics_streamingjobs.conversion_errors{${data.template_file.filter.rendered}} by {name,resource_group}
) > ${var.conversion_errors_threshold_critical}
EOF
type = "query alert"
notify_no_data = "${var.notify_no_data}"
@ -79,7 +91,11 @@ resource "datadog_monitor" "runtime_errors" {
name = "[${var.environment}] More than ${var.runtime_errors_threshold_critical} runtime errors on {{name}}"
message = "${var.message}"
query = "avg(last_5m):avg:azure.streamanalytics_streamingjobs.errors{${data.template_file.filter.rendered}} by {name,resource_group} > ${var.runtime_errors_threshold_critical}"
query = <<EOF
avg(last_5m): (
avg:azure.streamanalytics_streamingjobs.errors{${data.template_file.filter.rendered}} by {name,resource_group}
) > ${var.runtime_errors_threshold_critical}
EOF
type = "query alert"
notify_no_data = "${var.notify_no_data}"