4
4
default_alarms = {
5
5
# cluster status
6
6
cluster_status_red = {
7
- alarm_name = " cluster_status_red "
7
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _cluster_status_red "
8
8
alarm_description = " ${ aws_opensearch_domain . this . domain_name } has entered redstatus. One or more primary shard and its replicaes are not allocated to a node"
9
9
10
10
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -24,7 +24,7 @@ locals {
24
24
}
25
25
26
26
cluster_status_yellow = {
27
- alarm_name = " cluster_status_yellow "
27
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _cluster_status_yellow "
28
28
alarm_description = " ${ aws_opensearch_domain . this . domain_name } has entered yellow status. One or more indexes do not have a replica shard. "
29
29
30
30
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -44,7 +44,7 @@ locals {
44
44
}
45
45
46
46
cluster_writes_blocked = {
47
- alarm_name = " cluster_writes_blocked "
47
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _cluster_writes_blocked "
48
48
alarm_description = " ${ aws_opensearch_domain . this . domain_name } is blocking write requests"
49
49
50
50
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -85,7 +85,7 @@ locals {
85
85
86
86
# cpu utilization
87
87
data_high_cpu_utilization = {
88
- alarm_name = " data_high_cpu_util "
88
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _data_high_cpu_util "
89
89
alarm_description = " high cpu utilization on aos data nodes"
90
90
91
91
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -106,7 +106,7 @@ locals {
106
106
}
107
107
108
108
master_high_cpu_utilization = {
109
- alarm_name = " master_high_cpu_util "
109
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _master_high_cpu_util "
110
110
alarm_description = " high cpu utilization on aos master nodes"
111
111
112
112
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -128,7 +128,7 @@ locals {
128
128
129
129
warm_high_cpu_utilization = {
130
130
create = var.warm_instance_count != null
131
- alarm_name = " warm_high_cpu_util "
131
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _warm_high_cpu_util "
132
132
alarm_description = " high cpu utilization on aos warm nodes"
133
133
134
134
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -151,7 +151,7 @@ locals {
151
151
152
152
# jvm pressure
153
153
data_high_jvm_pressure = {
154
- alarm_name = " data_high_jvm_pressure "
154
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _data_high_jvm_pressure "
155
155
alarm_description = " high jvm_pressure on aos data nodes"
156
156
157
157
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -172,7 +172,7 @@ locals {
172
172
}
173
173
174
174
data_high_oldjvm_pressure = {
175
- alarm_name = " data_high_oldgenjvm_pressure "
175
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _data_high_oldgenjvm_pressure "
176
176
alarm_description = " high old gen jvm pressure on aos warm nodes"
177
177
178
178
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -193,7 +193,7 @@ locals {
193
193
}
194
194
195
195
master_high_jvm_pressure = {
196
- alarm_name = " master_high_jvm_pressure "
196
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _master_high_jvm_pressure "
197
197
alarm_description = " high jvm_pressure on aos master nodes"
198
198
199
199
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -214,7 +214,7 @@ locals {
214
214
}
215
215
216
216
master_high_oldjvm_pressure = {
217
- alarm_name = " master_high_oldgenjvm_pressure "
217
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _master_high_oldgenjvm_pressure "
218
218
alarm_description = " high old gen jvm pressure on aos master nodes"
219
219
220
220
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -237,7 +237,8 @@ locals {
237
237
238
238
# kms
239
239
aos_key_error = {
240
- alarm_name = " aos_key_error"
240
+ create = var.encrypt_kms_key_id != null
241
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _aos_key_error"
241
242
alarm_description = " the AWS KMS encryption key that is used to encrypt data at rest in your domain is disabled"
242
243
243
244
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -258,7 +259,8 @@ locals {
258
259
}
259
260
260
261
aos_key_inaccessible = {
261
- alarm_name = " aos_key_inaccessible"
262
+ create = var.encrypt_kms_key_id != null
263
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _aos_key_inaccessible"
262
264
alarm_description = " the AWS KMS encryption key that is used to encrypt data at rest in your domain has been deleted or has revoked its grants to OpenSearch Service"
263
265
264
266
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -280,7 +282,7 @@ locals {
280
282
281
283
# 5xx errors
282
284
server_errors = {
283
- alarm_name = " server_errors "
285
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _server_errors "
284
286
alarm_description = " One or more data nodes might be overloaded, or requests are failing to complete within the idle timeout period"
285
287
286
288
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -301,7 +303,7 @@ locals {
301
303
302
304
# threadpool
303
305
threadpool_high_write_avg = {
304
- alarm_name = " high_threadpool_write_queue_avg "
306
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _high_threadpool_write_queue_avg "
305
307
alarm_description = " the cluster is experiencing high indexing concurrency"
306
308
307
309
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -321,7 +323,7 @@ locals {
321
323
}
322
324
323
325
threadpool_high_search_avg = {
324
- alarm_name = " high_threadpool_search_avg "
326
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _high_threadpool_search_avg "
325
327
alarm_description = " The cluster is experiencing high search concurrency. Consider scaling your cluster. You can also increase the search queue size, but increasing it excessively can cause out of memory errors."
326
328
327
329
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -341,7 +343,7 @@ locals {
341
343
}
342
344
343
345
threadpool_high_search_max = {
344
- alarm_name = " high_threadpool_search_max "
346
+ alarm_name = " ${ aws_opensearch_domain . this . domain_name } _high_threadpool_search_max "
345
347
alarm_description = " The cluster is experiencing high search concurrency. Consider scaling your cluster. You can also increase the search queue size, but increasing it excessively can cause out of memory errors."
346
348
347
349
comparison_operator = " GreaterThanOrEqualToThreshold"
@@ -366,7 +368,7 @@ locals {
366
368
367
369
module "cloudwatch_alarms" {
368
370
source = " terraform-aws-modules/cloudwatch/aws//wrappers/metric-alarm"
369
- version = " ~> 4.5 .0"
371
+ version = " ~> 5.4 .0"
370
372
371
373
items = local. alarms
372
374
}
0 commit comments