-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
323 lines (269 loc) · 10.9 KB
/
variables.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
variable "domain_name" {
description = "The Elasticsearch domain name you want to monitor"
type = string
}
variable "alarm_name_prefix" {
description = "Alarm name prefix, used in the naming of alarms created"
type = string
default = ""
}
variable "alarm_name_postfix" {
description = "Alarm name suffix, used in the naming of alarms created"
type = string
default = ""
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
########################################
# SNS-Related Variables
########################################
variable "create_sns_topic" {
description = "If you don't want to create the SNS topic, set this to false. It will use the sns_topic value directly"
type = bool
default = true
}
variable "sns_topic" {
description = "SNS topic you want to specify. If leave empty, it will use a prefix and a timestampe appended"
type = string
default = ""
}
variable "sns_topic_prefix" {
description = "SNS topic prefix, only used if you're creating an SNS topic"
type = string
default = ""
}
variable "sns_topic_postfix" {
description = "SNS topic suffix, only used if you're creating an SNS topic"
type = string
default = ""
}
########################################
# Boolean flagging to disable specific alarms not interested in using
########################################
variable "monitor_cluster_status_is_red" {
description = "Enable monitoring of cluster status is in red"
type = bool
default = true
}
variable "monitor_cluster_status_is_yellow" {
description = "Enable monitoring of cluster status is in yellow"
type = bool
default = true
}
variable "monitor_free_storage_space_too_low" {
description = "Enable monitoring of cluster per-node free storage is too low"
type = bool
default = true
}
variable "monitor_free_storage_space_total_too_low" {
description = "Enable monitoring of cluster total free storage is too low. Disabled by default, if you set this you must set free_storage_space_total_threshold also"
type = bool
default = false
}
variable "monitor_cluster_index_writes_blocked" {
description = "Enable monitoring of cluster index writes being blocked"
type = bool
default = true
}
variable "monitor_min_available_nodes" {
description = "Enable monitoring of minimum available nodes"
type = bool
default = true
}
variable "monitor_automated_snapshot_failure" {
description = "Enable monitoring of automated snapshot failure"
type = bool
default = true
}
variable "monitor_cpu_utilization_too_high" {
description = "Enable monitoring of CPU utilization is too high"
type = bool
default = true
}
variable "monitor_jvm_memory_pressure_too_high" {
description = "Enable monitoring of JVM memory pressure is too high"
type = bool
default = true
}
variable "monitor_kms" {
description = "Enable monitoring of KMS-related metrics. Only enable this when using KMS with ElasticSearch"
type = bool
default = false
}
variable "monitor_master_cpu_utilization_too_high" {
description = "Enable monitoring of CPU utilization of master nodes are too high. Only enable this when dedicated master is enabled"
type = bool
default = false
}
variable "monitor_master_jvm_memory_pressure_too_high" {
description = "Enable monitoring of JVM memory pressure of master nodes are too high. Only enable this wwhen dedicated master is enabled"
type = bool
default = false
}
########################################
# Evaluation period time length (in seconds) for alarms
########################################
variable "alarm_min_available_nodes_period" {
description = "The period of the minimum available nodes should the statistics be applied in seconds"
type = number
default = 86400
}
variable "alarm_cluster_status_is_red_period" {
description = "The period of the cluster status is in red should the statistics be applied in seconds"
type = number
default = 60
}
variable "alarm_cluster_status_is_yellow_period" {
description = "The period of the cluster status is in yellow should the statistics be applied in seconds"
type = number
default = 60
}
variable "alarm_free_storage_space_too_low_period" {
description = "The period of the per-node free storage is too low should the statistics be applied in seconds"
type = number
default = 60
}
variable "alarm_free_storage_space_total_too_low_period" {
description = "The period of the total cluster free storage is too low should the statistics be applied in seconds"
type = number
default = 60
}
variable "alarm_cluster_index_writes_blocked_period" {
description = "The period of the cluster index writes being blocked should the statistics be applied in seconds"
type = number
default = 300
}
variable "alarm_automated_snapshot_failure_period" {
description = "The period of the automated snapshot failure should the statistics be applied in seconds"
type = number
default = 60
}
variable "alarm_cpu_utilization_too_high_period" {
description = "The period of the CPU utilization is too high should the statistics be applied in seconds"
type = number
default = 900
}
variable "alarm_jvm_memory_pressure_too_high_period" {
description = "The period of the JVM memory pressure is too high should the statistics be applied in seconds"
type = number
default = 900
}
variable "alarm_kms_period" {
description = "The period of the KMS-related metrics should the statistics be applied in seconds"
type = number
default = 60
}
variable "alarm_master_cpu_utilization_too_high_period" {
description = "The period of the CPU utilization of master nodes are too high should the statistics be applied in seconds"
type = number
default = 900
}
variable "alarm_master_jvm_memory_pressure_too_high_period" {
description = "The period of the JVM memory pressure of master nodes are too high should the statistics be applied in seconds"
type = number
default = 900
}
########################################
# Alarm thresholds
########################################
variable "free_storage_space_threshold" {
description = "The minimum amount of available storage space in megabytes. This is per-node."
type = number
default = 20480 ## 20 Gigabyte in MegaByte
}
variable "free_storage_space_total_threshold" {
description = "The minimum amount of available storage space in megabytes aggregated across your cluster (for multi-node). This is an aggregate, typically use (free_storage_space_threshold * min_available_nodes)"
type = number
default = 20480 ## 20 Gigabyte in MegaByte
}
variable "min_available_nodes" {
description = "The minimum available (reachable) nodes to have, set to non-zero to enable"
type = number
default = 0
}
variable "cpu_utilization_threshold" {
description = "The maximum percentage of CPU utilization"
type = number
default = 80 # 80 percent in Percentage
}
variable "jvm_memory_pressure_threshold" {
description = "The maximum percentage of the Java heap used for all data nodes in the cluster"
type = number
default = 80 # 80 percent in Percentage
}
variable "master_cpu_utilization_threshold" {
description = "The maximum percentage of CPU utilization of master nodes"
type = number
default = 80 # default same as `cpu_utilization_threshold` in Percentage
}
variable "master_jvm_memory_pressure_threshold" {
description = "The maximum percentage of the Java heap used for master nodes in the cluster"
type = number
default = 80 # default same as `jvm_memory_pressure_threshold` in Percentage
}
########################################
# Evaluation periods for alarms
########################################
variable "alarm_cluster_status_is_red_periods" {
description = "The number of periods to alert that cluster status is red. Default: 1, raise this to be less noisy, as this can occur often for only 1 period"
type = number
default = 1
}
variable "alarm_cluster_status_is_yellow_periods" {
description = "The number of periods to alert that cluster status is yellow. Default: 1, raise this to be less noisy, as this can occur often for only 1 period"
type = number
default = 1
}
variable "alarm_free_storage_space_too_low_periods" {
description = "The number of periods to alert that the per-node free storage space is too low. Default: 1, raise this to be less noisy, as this can occur often for only 1 period"
type = number
default = 1
}
variable "alarm_free_storage_space_total_too_low_periods" {
description = "The number of periods to alert that total cluster free storage space is too low. Default: 1, raise this to be less noisy, as this can occur often for only 1 period"
type = number
default = 1
}
variable "alarm_cluster_index_writes_blocked_periods" {
description = "The number of periods to alert that cluster index writes are blocked. Default: 1, raise this to be less noisy, as this can occur often for only 1 period"
type = number
default = 1
}
variable "alarm_min_available_nodes_periods" {
description = "The number of periods to alert that minimum number of available nodes dropped below a threshold. Default: 1, raise this to be less noisy, as this can occur often for only 1 period"
type = number
default = 1
}
variable "alarm_automated_snapshot_failure_periods" {
description = "The number of periods to alert that automatic snapshots failed. Default: 1, raise this to be less noisy, as this can occur often for only 1 period"
type = number
default = 1
}
variable "alarm_cpu_utilization_too_high_periods" {
description = "The number of periods to alert that CPU usage is too high. Default: 3, raise this to be less noisy, as this can occur often for only 1 period"
type = number
default = 3
}
variable "alarm_jvm_memory_pressure_too_high_periods" {
description = "The number of periods which it must be in the alarmed state to alert"
type = number
default = 1
}
variable "alarm_master_cpu_utilization_too_high_periods" {
description = "The number of periods to alert that masters CPU usage is too high. Default: 3, raise this to be less noisy, as this can occur often for only 1 period"
type = number
default = 3
}
variable "alarm_master_jvm_memory_pressure_too_high_periods" {
description = "The number of periods which it must be in the alarmed state to alert"
type = number
default = 1
}
variable "alarm_kms_periods" {
description = "The number of periods to alert that kms has failed. Default: 1, raise this to be less noisy, as this can occur often for only 1 period"
type = number
default = 1
}