-
Notifications
You must be signed in to change notification settings - Fork 1
/
monitor.tf
128 lines (118 loc) · 4.8 KB
/
monitor.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
variable "apigee_host" {
type = string
}
variable "apigee_protocol" {
type = string
}
variable "apigee_test_insert_license_api_key" {
type = string
}
resource "newrelic_synthetics_secure_credential" "apigee_test_insert_license_api_key" {
key = "APIGEE_TEST_INSERT_LICENSE_API_KEY"
value = var.apigee_test_insert_license_api_key
description = "NR trace api insert license key"
}
resource "newrelic_synthetics_script_monitor" "newrelic_log_monitor" {
name = "newrelic-log"
type = "SCRIPT_API"
locations_public = ["EU_WEST_2"]
period = "EVERY_15_MINUTES"
status = "ENABLED"
script = templatefile("./script.tftpl", { ENDPOINT = "/newrelic/log", APIGEE_PROTOCOL = var.apigee_protocol, APIGEE_HOST = var.apigee_host, REGION = var.new_relic_region })
script_language = "JAVASCRIPT"
runtime_type = "NODE_API"
runtime_type_version = "16.10"
tag {
key = "terraform"
values = [true]
}
}
resource "newrelic_synthetics_script_monitor" "newrelic_logging_monitor" {
name = "newrelic-logging"
type = "SCRIPT_API"
locations_public = ["EU_WEST_2"]
period = "EVERY_15_MINUTES"
status = "ENABLED"
script = templatefile("./script.tftpl", { ENDPOINT = "/newrelic/logging", APIGEE_PROTOCOL = var.apigee_protocol, APIGEE_HOST = var.apigee_host, REGION = var.new_relic_region })
script_language = "JAVASCRIPT"
runtime_type = "NODE_API"
runtime_type_version = "16.10"
tag {
key = "terraform"
values = [true]
}
}
resource "newrelic_synthetics_script_monitor" "newrelic_metric_monitor" {
name = "newrelic-metric"
type = "SCRIPT_API"
locations_public = ["EU_WEST_2"]
period = "EVERY_15_MINUTES"
status = "ENABLED"
script = templatefile("./script.tftpl", { ENDPOINT = "/newrelic/metric", APIGEE_PROTOCOL = var.apigee_protocol, APIGEE_HOST = var.apigee_host, REGION = var.new_relic_region })
script_language = "JAVASCRIPT"
runtime_type = "NODE_API"
runtime_type_version = "16.10"
tag {
key = "terraform"
values = [true]
}
}
resource "newrelic_synthetics_script_monitor" "newrelic_trace_monitor" {
name = "newrelic-trace"
type = "SCRIPT_API"
locations_public = ["EU_WEST_2"]
period = "EVERY_15_MINUTES"
status = "ENABLED"
script = templatefile("./script.tftpl", { ENDPOINT = "/newrelic/trace", APIGEE_PROTOCOL = var.apigee_protocol, APIGEE_HOST = var.apigee_host, REGION = var.new_relic_region })
script_language = "JAVASCRIPT"
runtime_type = "NODE_API"
runtime_type_version = "16.10"
tag {
key = "terraform"
values = [true]
}
}
resource "newrelic_synthetics_script_monitor" "newrelic_trace_and_metric_and_log_monitor" {
name = "newrelic-trace-and-metric-and-log"
type = "SCRIPT_API"
locations_public = ["EU_WEST_2"]
period = "EVERY_15_MINUTES"
status = "ENABLED"
script = templatefile("./script.tftpl", { ENDPOINT = "/newrelic/trace-and-metric-and-log", APIGEE_PROTOCOL = var.apigee_protocol, APIGEE_HOST = var.apigee_host, REGION = var.new_relic_region })
script_language = "JAVASCRIPT"
runtime_type = "NODE_API"
runtime_type_version = "16.10"
tag {
key = "terraform"
values = [true]
}
}
resource "newrelic_synthetics_script_monitor" "newrelic_trace_and_metric_and_log_obfuscate_monitor" {
name = "newrelic-trace-and-metric-and-log-obfuscate"
type = "SCRIPT_API"
locations_public = ["EU_WEST_2"]
period = "EVERY_15_MINUTES"
status = "ENABLED"
script = templatefile("./script.tftpl", { ENDPOINT = "/newrelic/trace-and-metric-and-log-obfuscate", APIGEE_PROTOCOL = var.apigee_protocol, APIGEE_HOST = var.apigee_host, REGION = var.new_relic_region })
script_language = "JAVASCRIPT"
runtime_type = "NODE_API"
runtime_type_version = "16.10"
tag {
key = "terraform"
values = [true]
}
}
resource "newrelic_synthetics_script_monitor" "newrelic_trace_and_logging_monitor" {
name = "newrelic-trace-and-logging"
type = "SCRIPT_API"
locations_public = ["EU_WEST_2"]
period = "EVERY_15_MINUTES"
status = "ENABLED"
script = templatefile("./script.tftpl", { ENDPOINT = "/newrelic/trace-and-logging", APIGEE_PROTOCOL = var.apigee_protocol, APIGEE_HOST = var.apigee_host, REGION = var.new_relic_region })
runtime_type = "NODE_API"
runtime_type_version = "16.10"
tag {
key = "terraform"
values = [true]
}
}