MON-78 Changing naming convention for variables
This commit is contained in:
parent
9261bde158
commit
0b03cade41
@ -14,34 +14,34 @@ variable "delay" {
|
||||
default = "600"
|
||||
}
|
||||
|
||||
variable "su_utilization_warning" {
|
||||
variable "su_utilization_threshold_warning" {
|
||||
default = 60
|
||||
}
|
||||
|
||||
variable "su_utilization_critical" {
|
||||
variable "su_utilization_threshold_critical" {
|
||||
default = 80
|
||||
}
|
||||
|
||||
variable "failed_function_requests_warning" {
|
||||
variable "function_requests_threshold_warning" {
|
||||
default = 0
|
||||
}
|
||||
|
||||
variable "failed_function_requests_critical" {
|
||||
variable "function_requests_threshold_critical" {
|
||||
default = 10
|
||||
}
|
||||
|
||||
variable "conversion_errors_warning" {
|
||||
variable "conversion_errors_threshold_warning" {
|
||||
default = 0
|
||||
}
|
||||
|
||||
variable "conversion_errors_critical" {
|
||||
variable "conversion_errors_threshold_critical" {
|
||||
default = 10
|
||||
}
|
||||
|
||||
variable "runtime_errors_warning" {
|
||||
variable "runtime_errors_threshold_warning" {
|
||||
default = 0
|
||||
}
|
||||
|
||||
variable "runtime_errors_critical" {
|
||||
variable "runtime_errors_threshold_critical" {
|
||||
default = 10
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
resource "datadog_monitor" "su_utilization" {
|
||||
name = "[${var.environment}] SU utilization at more than ${var.su_utilization_critical}% on {{name}}"
|
||||
name = "[${var.environment}] SU utilization at more than ${var.su_utilization_threshold_critical}% on {{name}}"
|
||||
message = "${var.message}"
|
||||
|
||||
query = "avg(last_5m):avg:azure.streamanalytics_streamingjobs.resource_utilization{${var.filter_tags}} by {name,resource_group} > ${var.su_utilization_critical}"
|
||||
query = "avg(last_5m):avg:azure.streamanalytics_streamingjobs.resource_utilization{${var.filter_tags}} by {name,resource_group} > ${var.su_utilization_threshold_critical}"
|
||||
type = "query alert"
|
||||
|
||||
notify_no_data = "${var.notify_no_data}"
|
||||
@ -16,16 +16,16 @@ resource "datadog_monitor" "su_utilization" {
|
||||
new_host_delay = "${var.delay}"
|
||||
no_data_timeframe = 20
|
||||
thresholds {
|
||||
warning = "${var.su_utilization_warning}"
|
||||
critical = "${var.su_utilization_critical}"
|
||||
warning = "${var.su_utilization_threshold_warning}"
|
||||
critical = "${var.su_utilization_threshold_critical}"
|
||||
}
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "failed_function_requests" {
|
||||
name = "[${var.environment}] More than ${var.failed_function_requests_critical} failed function requests on {{name}}"
|
||||
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{*} by {name,resource_group} > ${var.failed_function_requests_critical}"
|
||||
query = "avg(last_5m):avg:azure.streamanalytics_streamingjobs.aml_callout_failed_requests{*} by {name,resource_group} > ${var.function_requests_threshold_critical}"
|
||||
type = "query alert"
|
||||
|
||||
notify_no_data = "${var.notify_no_data}"
|
||||
@ -39,16 +39,16 @@ resource "datadog_monitor" "failed_function_requests" {
|
||||
new_host_delay = "${var.delay}"
|
||||
no_data_timeframe = 20
|
||||
thresholds {
|
||||
warning = "${var.failed_function_requests_warning}"
|
||||
critical = "${var.failed_function_requests_critical}"
|
||||
warning = "${var.function_requests_threshold_warning}"
|
||||
critical = "${var.function_requests_threshold_critical}"
|
||||
}
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "conversion_errors" {
|
||||
name = "[${var.environment}] More than ${var.conversion_errors_critical} conversion errors on {{name}}"
|
||||
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{*} by {name,resource_group} > ${var.conversion_errors_critical}"
|
||||
query = "avg(last_5m):avg:azure.streamanalytics_streamingjobs.conversion_errors{*} by {name,resource_group} > ${var.conversion_errors_threshold_critical}"
|
||||
type = "query alert"
|
||||
|
||||
notify_no_data = "${var.notify_no_data}"
|
||||
@ -62,16 +62,16 @@ resource "datadog_monitor" "conversion_errors" {
|
||||
new_host_delay = "${var.delay}"
|
||||
no_data_timeframe = 20
|
||||
thresholds {
|
||||
warning = "${var.conversion_errors_warning}"
|
||||
critical = "${var.conversion_errors_critical}"
|
||||
warning = "${var.conversion_errors_threshold_warning}"
|
||||
critical = "${var.conversion_errors_threshold_critical}"
|
||||
}
|
||||
}
|
||||
|
||||
resource "datadog_monitor" "runtime_errors" {
|
||||
name = "[${var.environment}] More than ${var.runtime_errors_critical} runtime errors on {{name}}"
|
||||
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{*} by {name,resource_group} > ${var.runtime_errors_critical}"
|
||||
query = "avg(last_5m):avg:azure.streamanalytics_streamingjobs.errors{*} by {name,resource_group} > ${var.runtime_errors_threshold_critical}"
|
||||
type = "query alert"
|
||||
|
||||
notify_no_data = "${var.notify_no_data}"
|
||||
@ -85,7 +85,7 @@ resource "datadog_monitor" "runtime_errors" {
|
||||
new_host_delay = "${var.delay}"
|
||||
no_data_timeframe = 20
|
||||
thresholds {
|
||||
warning = "${var.runtime_errors_warning}"
|
||||
critical = "${var.runtime_errors_critical}"
|
||||
warning = "${var.runtime_errors_threshold_warning}"
|
||||
critical = "${var.runtime_errors_threshold_critical}"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user