-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathblocked-clients.tf
32 lines (28 loc) · 1.34 KB
/
blocked-clients.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
locals {
blocked_clients_filter = coalesce(
var.blocked_clients_filter_override,
var.filter_str
)
}
module "blocked_clients_clients" {
source = "kabisa/generic-monitor/datadog"
version = "1.0.0"
name = "Blocked Clients"
query = "avg(${var.blocked_clients_evaluation_period}):avg:redis.clients.blocked{${local.blocked_clients_filter}} >= ${var.blocked_clients_critical}"
alert_message = "${var.service} is waiting to fill a request with data. Until the data is filled, the client is blocked. Current threshold: {{threshold}} and is currently at {{value}} blocked clients. This could indicate a latency issue or timeouts upstream."
recovery_message = "${var.service} blocked clients is back to {{value}}"
# monitor level vars
enabled = var.blocked_clients_enabled
alerting_enabled = var.blocked_clients_alerting_enabled
critical_threshold = var.blocked_clients_critical
warning_threshold = var.blocked_clients_warning
priority = var.blocked_clients_priority
docs = var.blocked_clients_docs
note = var.blocked_clients_note
# module level vars
env = var.alert_env
service = var.service
notification_channel = var.notification_channel
additional_tags = var.additional_tags
locked = var.locked
}