-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathredis.tf
More file actions
28 lines (25 loc) · 857 Bytes
/
redis.tf
File metadata and controls
28 lines (25 loc) · 857 Bytes
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
resource "azurerm_monitor_metric_alert" "redis_alert_errors" {
count = var.env == "prod" ? 1 : 0
name = "redis_errors"
resource_group_name = data.azurerm_resource_group.rg-cache[0].name
scopes = [data.azurerm_redis_cache.portal_redis_cache[0].id]
severity = 1
frequency = "PT5M"
window_size = "PT5M"
description = <<EOT
Redis error reported. Actions:
(1) Check that the portal is still up
(2) Check health of the Azure Redis Cache
EOT
tags = var.common_tags
criteria {
metric_namespace = "Microsoft.Cache/Redis"
metric_name = "errors"
aggregation = "Total"
operator = "GreaterThanOrEqual"
threshold = 1
}
action {
action_group_id = azurerm_monitor_action_group.pre-support[count.index].id
}
}