File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 55 var . enable_glue_create ? lower (var. glue_create_config . sqs_queue_name_dl ) : local . base_dlq_name ,
66 var . enable_glue_sync ? lower (var. glue_sync_config . sqs_queue_name_dl ) : local . base_dlq_name ,
77 ]
8+ additional_query_conditions = length (var. monitoring_query_conditions ) > 0 ? " , ${ var . monitoring_query_conditions } " : " "
89}
910
1011resource "datadog_monitor" "dead_letters_monitor" {
@@ -17,7 +18,7 @@ resource "datadog_monitor" "dead_letters_monitor" {
1718 dead_letters_queue_name = each.key
1819 notify = join (" , " , var. dl_alert_recipients )
1920 })
20- query = " avg(last_1h):avg:aws.sqs.approximate_number_of_messages_visible{queuename:${ each . key } } > ${ var . dl_critical } "
21+ query = " avg(last_1h):avg:aws.sqs.approximate_number_of_messages_visible{queuename:${ each . key } ${ local . additional_query_conditions } } > ${ var . dl_critical } "
2122
2223 monitor_thresholds {
2324 warning = var. dl_warning
Original file line number Diff line number Diff line change @@ -247,6 +247,12 @@ variable "tags_monitoring" {
247247 description = " A list of tags to assign to the monitoring resource"
248248}
249249
250+ variable "monitoring_query_conditions" {
251+ type = string
252+ description = " Monitoring query conditions a comma peratde key:value pair list"
253+ default = " "
254+ }
255+
250256variable "enable_aws_glue_catalog_table" {
251257 type = bool
252258 description = " Enable glue catalog table"
You can’t perform that action at this time.
0 commit comments