This repository has been archived by the owner on May 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
76 lines (71 loc) · 2.09 KB
/
main.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
module "example1" {
source = "./modules/Talisker"
monitorName = "NRDB Long Alerts"
frequency = 1
userAPIKey = var.userAPIKey
insertAPIKey = var.insertAPIKey
accountId = var.terraformNRAccountId
notificationChannelId = newrelic_alert_channel.SlackDemo.id
tasks = [
{
id = "example1"
name = "Simple value"
accountId = var.terraformNRAccountId
query = "FROM Public_APICall select count(*)/100000 as value since 1 day ago"
selector = "value"
fillNullValue = 0
chaining="NONE"
invertResult = false
alert_operator = "below"
alert_critical_threshold = 2500
alert_warning_threshold = 3000
alert_threshold_occurrences = "all"
enabled = true
},
{
id = "example2"
name = "Compare with"
accountId = var.terraformNRAccountId
query = "FROM Public_APICall select count(*) as value since 1 day ago compare with 1 week ago"
selector = "value"
fillNullValue = 0
chaining="NONE"
invertResult = false
alert_operator = "below"
alert_critical_threshold = 0
alert_warning_threshold = 10
alert_threshold_occurrences = "all"
enabled = true
},
{
id = "example3"
name = "Chaining setup"
accountId = var.terraformNRAccountId
query = "FROM Public_APICall select count(*) as value since 8 day ago until 7 day ago"
selector = "value"
fillNullValue = 0
chaining="NONE"
invertResult = false
alert_operator = "below"
alert_critical_threshold = 0
alert_warning_threshold = 0
alert_threshold_occurrences = "all"
enabled = false
},
{
id = "example4"
name = "Chained value"
accountId = var.terraformNRAccountId
query = "FROM Public_APICall select count(*) as value since 1 day ago"
selector = "value"
fillNullValue = 0
chaining="PERC_DIFF"
invertResult = true
alert_operator = "above"
alert_critical_threshold = 40
alert_warning_threshold = 30
alert_threshold_occurrences = "all"
enabled = true
}
]
}