forked from hmcts/wa-shared-infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalerts.tf
39 lines (34 loc) · 1.77 KB
/
alerts.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module "wa-exception-alert" {
source = "git@github.com:hmcts/cnp-module-metric-alert"
location = var.location
app_insights_name = "wa-${var.env}"
alert_name = "wa-dlq-alert"
alert_desc = "Triggers when a message falls into the Dead Letter Queue, works with 5 minute poll in wa-${var.env}."
app_insights_query = "union traces, exceptions | where customDimensions[\"LoggingLevel\"] == \"WARN\" and customDimensions[\"Logger Message\"] contains \"dead lettered\" | sort by timestamp desc"
custom_email_subject = "Alert: Message was dead-lettered in wa-${var.env}"
frequency_in_minutes = 5
time_window_in_minutes = 5
severity_level = "2"
action_group_name = "wa-support"
trigger_threshold_operator = "GreaterThan"
trigger_threshold = 0
resourcegroup_name = azurerm_resource_group.rg.name
enabled = true
}
module "wa-camunda-task-unconfigured-exception-alert" {
source = "git@github.com:hmcts/cnp-module-metric-alert"
location = var.location
app_insights_name = "camunda-bpm-appinsights-${var.env}"
alert_name = "wa-camunda-task-unconfigured-alert"
alert_desc = "Triggers when a task could not be configured and it is saved with an unconfigured task state, works with 60 minute poll in camunda-bpm-appinsights-${var.env}."
app_insights_query = "union traces, exceptions | where customDimensions[\"LoggingLevel\"] == \"WARN\" and message contains \"Task could not be configured. Task state was set to 'unconfigured'\" | sort by timestamp desc"
custom_email_subject = "Alert: A task could not be configure in wa-${var.env}"
frequency_in_minutes = 60
time_window_in_minutes = 60
severity_level = "2"
action_group_name = "wa-support"
trigger_threshold_operator = "GreaterThan"
trigger_threshold = 0
resourcegroup_name = "camunda-${var.env}"
enabled = true
}