-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatus-check.tf
35 lines (29 loc) · 1.21 KB
/
status-check.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
module "status-check" {
source = "weglot/service-check-monitor/datadog"
version = "2.1.0"
name = "Nginx - Status check"
metric_name = "nginx.can_connect"
by_tags = ["host"]
include_tags = ["env:${var.env}", "service:${var.service}"]
alert_message = "Nginx is not running on ${var.service} node {{host.name}}."
recovery_message = "Nginx is back up-and-running on ${var.service} node {{host.name}}."
require_full_window = false
no_data_timeframe = 2
notify_no_data = false
# module level vars
env = var.env
service = var.service
service_display_name = var.service_display_name
notification_channel = var.notification_channel
additional_tags = var.additional_tags
name_prefix = var.name_prefix
name_suffix = var.name_suffix
restricted_roles = var.restricted_roles
# monitor level vars
enabled = var.status_check_enabled
alerting_enabled = var.status_check_alerting_enabled
critical_threshold = 1
ok_threshold = 1
priority = 2
docs = "This monitor raises alert when the agent is unable to connect to and collect metrics from the monitored Nginx instance."
}