MON-78 add subscription_id and tags
This commit is contained in:
parent
c4c64299b8
commit
efad440d62
@ -19,14 +19,13 @@ Inputs
|
||||
|
||||
| Name | Description | Type | Default | Required |
|
||||
|------|-------------|:----:|:-----:|:-----:|
|
||||
| conversion_errors_threshold_critical | | string | `10` | no |
|
||||
| conversion_errors_threshold_warning | | string | `0` | no |
|
||||
| conversion_errors_threshold_critical | Conversion errors limit (critical threshold) | string | `10` | no |
|
||||
| conversion_errors_threshold_warning | Conversion errors limit (warning threshold) | string | `0` | no |
|
||||
| delay | Delay in seconds for the metric evaluation | string | `600` | no |
|
||||
| environment | Architecture environment | string | - | yes |
|
||||
| function_requests_threshold_critical | | string | `10` | no |
|
||||
| function_requests_threshold_warning | | string | `0` | no |
|
||||
| function_requests_threshold_critical | Failed Function Request rate limit (critical threshold) | string | `10` | no |
|
||||
| function_requests_threshold_warning | Failed Function Request rate limit (warning threshold) | string | `0` | no |
|
||||
| message | Message sent when a monitor is triggered | string | - | yes |
|
||||
| notify_no_data | | string | `false` | no |
|
||||
| runtime_errors_threshold_critical | | string | `10` | no |
|
||||
| runtime_errors_threshold_warning | | string | `0` | no |
|
||||
| su_utilization_threshold_critical | | string | `80` | no |
|
||||
|
||||
@ -26,8 +26,6 @@ variable "service" {
|
||||
}
|
||||
|
||||
# Global DataDog
|
||||
|
||||
|
||||
variable "message" {
|
||||
description = "Message sent when a Redis monitor is triggered"
|
||||
}
|
||||
@ -44,33 +42,41 @@ variable "use_filter_tags" {
|
||||
|
||||
# Azure Stream Analytics specific
|
||||
variable "su_utilization_threshold_warning" {
|
||||
description = "Streaming Unit utilization rate limit (warning threshold)"
|
||||
default = 60
|
||||
}
|
||||
|
||||
variable "su_utilization_threshold_critical" {
|
||||
description = "Streaming Unit utilization rate limit (critical threshold)"
|
||||
default = 80
|
||||
}
|
||||
|
||||
variable "function_requests_threshold_warning" {
|
||||
description = "Failed Function Request rate limit (warning threshold)"
|
||||
default = 0
|
||||
}
|
||||
|
||||
variable "function_requests_threshold_critical" {
|
||||
description = "Failed Function Request rate limit (critical threshold)"
|
||||
default = 10
|
||||
}
|
||||
|
||||
variable "conversion_errors_threshold_warning" {
|
||||
description = "Conversion errors limit (warning threshold)"
|
||||
default = 0
|
||||
}
|
||||
|
||||
variable "conversion_errors_threshold_critical" {
|
||||
description = "Conversion errors limit (critical threshold)"
|
||||
default = 10
|
||||
}
|
||||
|
||||
variable "runtime_errors_threshold_warning" {
|
||||
description = "Runtime errors limit (warning threshold)"
|
||||
default = 0
|
||||
}
|
||||
|
||||
variable "runtime_errors_threshold_critical" {
|
||||
description = "Runtime errors limit (critical threshold)"
|
||||
default = 10
|
||||
}
|
||||
|
||||
@ -41,8 +41,9 @@ resource "datadog_monitor" "failed_function_requests" {
|
||||
|
||||
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}
|
||||
avg:azure.streamanalytics_streamingjobs.aml_callout_failed_requests{${data.template_file.filter.rendered}} by {name,resource_group}.as_count() /
|
||||
avg:azure.streamanalytics_streamingjobs.aml_callout_requests{${data.template_file.filter.rendered}} by {name,resource_group}.as_count()
|
||||
) * 100 > ${var.function_requests_threshold_critical}
|
||||
EOF
|
||||
type = "query alert"
|
||||
|
||||
@ -66,7 +67,8 @@ resource "datadog_monitor" "failed_function_requests" {
|
||||
|
||||
resource "datadog_monitor" "conversion_errors" {
|
||||
name = "[${var.environment}] Stream Analytics more than ${var.conversion_errors_threshold_critical} conversion errors on {{name}}"
|
||||
message = "${var.message}"
|
||||
# Hard Coded Message while we don't know how to configure warning and critical thresholds
|
||||
message = "@FR-CloudPublic-run@fr.clara.net"
|
||||
|
||||
query = <<EOF
|
||||
avg(last_5m): (
|
||||
@ -95,7 +97,8 @@ resource "datadog_monitor" "conversion_errors" {
|
||||
|
||||
resource "datadog_monitor" "runtime_errors" {
|
||||
name = "[${var.environment}] Stream Analytics more than ${var.runtime_errors_threshold_critical} runtime errors on {{name}}"
|
||||
message = "${var.message}"
|
||||
# Hard Coded Message while we don't know how to configure warning and critical thresholds
|
||||
message = "@FR-CloudPublic-run@fr.clara.net"
|
||||
|
||||
query = <<EOF
|
||||
avg(last_5m): (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user