-
Notifications
You must be signed in to change notification settings - Fork 1
/
in_sync_nodes_dropped.tf
32 lines (28 loc) · 1.58 KB
/
in_sync_nodes_dropped.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 {
in_sync_nodes_dropped_filter = var.in_sync_nodes_dropped_filter_override != "" ? var.in_sync_nodes_dropped_filter_override : var.filter_str
in_sync_nodes_dropped_notification_channel = var.in_sync_nodes_dropped_alerting_enabled ? var.notification_channel : ""
}
module "in_sync_nodes_dropped" {
source = "kabisa/generic-monitor/datadog"
version = "1.0.0"
name = "In Sync Nodes dropped"
query = "avg(${var.in_sync_nodes_dropped_evaluation_period}):max:kafka.replication.isr_shrinks.rate{${local.in_sync_nodes_dropped_filter}} by {aiven-service} - max:kafka.replication.isr_expands.rate{${local.in_sync_nodes_dropped_filter}} by {aiven-service} > ${var.in_sync_nodes_dropped_critical}"
alert_message = "The number of in Sync Nodes dropped compared to the number of In Sync Nodes that were added"
recovery_message = ""
# monitor level vars
enabled = var.in_sync_nodes_dropped_enabled
alerting_enabled = var.in_sync_nodes_dropped_alerting_enabled
critical_threshold = var.in_sync_nodes_dropped_critical
# warning_threshold = var.in_sync_nodes_dropped_warning
priority = min(var.in_sync_nodes_dropped_priority + var.priority_offset, 5)
docs = var.in_sync_nodes_dropped_docs
note = var.in_sync_nodes_dropped_note
# module level vars
env = var.env
service = var.service
notification_channel = var.notification_channel
additional_tags = var.additional_tags
locked = var.locked
name_prefix = var.name_prefix
name_suffix = var.name_suffix
}