-
Notifications
You must be signed in to change notification settings - Fork 5
/
containers.tf
30 lines (26 loc) · 1.26 KB
/
containers.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
locals {
containers_filter = var.containers_filter_override != "" ? var.containers_filter_override : var.filter_str
containers_notification_channel = var.containers_alerting_enabled ? var.notification_channel : ""
}
module "containers" {
source = "kabisa/generic-monitor/datadog"
version = "1.0.0"
name = "Estimated Containers Usage"
query = "avg(${var.containers_evaluation_period}):sum:datadog.estimated_usage.containers{${local.containers_filter}} > ${var.containers_critical}"
alert_message = "The Plan specified {{threshold}} Containers. The current estimate ({{value}}) exceeds the plan"
recovery_message = "Count of Monitored Containers has recovered"
# monitor level vars
enabled = var.containers_enabled
alerting_enabled = var.containers_alerting_enabled
critical_threshold = var.containers_critical
warning_threshold = var.containers_warning
priority = var.containers_priority
docs = var.containers_docs
note = var.containers_note
# module level vars
env = var.env
service = var.service
notification_channel = var.notification_channel
additional_tags = var.additional_tags
locked = var.locked
}