generated from kabisa/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dns-response-time-google.tf
37 lines (32 loc) · 1.5 KB
/
dns-response-time-google.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
locals {
dns_response_time_google_filter = coalesce(
var.dns_response_time_google_filter_override,
var.filter_str
)
}
module "dns_response_time_google" {
source = "kabisa/generic-monitor/datadog"
version = "1.0.0"
name = "DNS Response time Google lookup"
query = "avg(${var.dns_response_time_google_evaluation_period}):avg:dns.response_time{${local.dns_response_time_google_filter}} by {host,cluster_name} > ${var.dns_response_time_google_critical}"
# alert specific configuration
require_full_window = false
alert_message = "DNS Response time Google lookup ({{ value }}) in {{ service }} exceed {{ threshold }}"
recovery_message = "DNS Response time Google lookup ({{ value }}) in {{ service }} has recovered"
# 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
# monitor level vars
enabled = var.dns_response_time_google_enabled
alerting_enabled = var.dns_response_time_google_alerting_enabled
warning_threshold = var.dns_response_time_google_warning
critical_threshold = var.dns_response_time_google_critical
priority = min(var.dns_response_time_google_priority + var.priority_offset, 5)
docs = var.dns_response_time_google_docs
note = var.dns_response_time_google_note
}