Skip to content

Commit db23abe

Browse files
committed
fix dimensions, namespace
1 parent 35ae6b2 commit db23abe

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

alarms.tf

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ locals {
88
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"
99

1010
comparison_operator = "GreaterThanOrEqualToThreshold"
11-
evaluation_periods = 1
12-
threshold = 1
11+
evaluation_periods = 5
12+
threshold = 5
1313
period = 1 * local.minute
1414

15-
namespace = "ES/OpenSearchService"
15+
namespace = "AWS/ES"
1616
metric_name = "ClusterStatus.red"
1717
statistic = "Maximum"
1818
treat_missing_data = "notBreaching"
1919

2020
dimensions = {
2121
DomainName = aws_opensearch_domain.this.domain_name
22+
ClientId = data.aws_caller_identity.current.account_id
2223
}
2324
alarm_actions = var.alarm_actions
2425
ok_actions = var.ok_actions
@@ -34,7 +35,7 @@ locals {
3435
threshold = 1
3536
period = 1 * local.minute
3637

37-
namespace = "ES/OpenSearchService"
38+
namespace = "AWS/ES"
3839
metric_name = "ClusterStatus.yellow"
3940
statistic = "Maximum"
4041
treat_missing_data = "notBreaching"
@@ -56,7 +57,7 @@ locals {
5657
threshold = 1
5758
period = 1 * local.minute
5859

59-
namespace = "ES/OpenSearchService"
60+
namespace = "AWS/ES"
6061
metric_name = "ClusterIndexWritesBlocked"
6162
statistic = "Maximum"
6263
treat_missing_data = "notBreaching"
@@ -78,7 +79,7 @@ locals {
7879
threshold = 1
7980
period = 60 * local.minute * 24
8081

81-
namespace = "ES/OpenSearchService"
82+
namespace = "AWS/ES"
8283
metric_name = "Nodes"
8384
statistic = "Maximum"
8485
treat_missing_data = "notBreaching"
@@ -103,7 +104,7 @@ locals {
103104
period = 15 * local.minute
104105
unit = "Percent"
105106

106-
namespace = "ES/OpenSearchService"
107+
namespace = "AWS/ES"
107108
metric_name = "CPUUtilization"
108109
statistic = "Maximum"
109110
treat_missing_data = "notBreaching"
@@ -126,7 +127,7 @@ locals {
126127
period = 15 * local.minute
127128
unit = "Percent"
128129

129-
namespace = "ES/OpenSearchService"
130+
namespace = "AWS/ES"
130131
metric_name = "MasterCPUUtilization"
131132
statistic = "Maximum"
132133
treat_missing_data = "notBreaching"
@@ -150,7 +151,7 @@ locals {
150151
period = 15 * local.minute
151152
unit = "Percent"
152153

153-
namespace = "ES/OpenSearchService"
154+
namespace = "AWS/ES"
154155
metric_name = "WarmCPUUtilization"
155156
statistic = "Maximum"
156157
treat_missing_data = "notBreaching"
@@ -175,7 +176,7 @@ locals {
175176
period = 15 * local.minute
176177
unit = "Percent"
177178

178-
namespace = "ES/OpenSearchService"
179+
namespace = "AWS/ES"
179180
metric_name = "JVMMemoryPressure"
180181
statistic = "Maximum"
181182
treat_missing_data = "notBreaching"
@@ -198,7 +199,7 @@ locals {
198199
period = 15 * local.minute
199200
unit = "Percent"
200201

201-
namespace = "ES/OpenSearchService"
202+
namespace = "AWS/ES"
202203
metric_name = "OldGenJVMMemoryPressure"
203204
statistic = "Maximum"
204205
treat_missing_data = "notBreaching"
@@ -221,7 +222,7 @@ locals {
221222
period = 15 * local.minute
222223
unit = "Percent"
223224

224-
namespace = "ES/OpenSearchService"
225+
namespace = "AWS/ES"
225226
metric_name = "MasterJVMMemoryPressure"
226227
statistic = "Maximum"
227228
treat_missing_data = "notBreaching"
@@ -244,7 +245,7 @@ locals {
244245
period = 60 * local.minute
245246
unit = "Percent"
246247

247-
namespace = "ES/OpenSearchService"
248+
namespace = "AWS/ES"
248249
metric_name = "MasterOldGenJVMMemoryPressure"
249250
statistic = "Maximum"
250251
treat_missing_data = "notBreaching"
@@ -270,7 +271,7 @@ locals {
270271
period = 1 * local.minute
271272
unit = "Percent"
272273

273-
namespace = "ES/OpenSearchService"
274+
namespace = "AWS/ES"
274275
metric_name = "KMSKeyError"
275276
statistic = "Maximum"
276277
treat_missing_data = "notBreaching"
@@ -294,7 +295,7 @@ locals {
294295
period = 1 * local.minute
295296
unit = "Percent"
296297

297-
namespace = "ES/OpenSearchService"
298+
namespace = "AWS/ES"
298299
metric_name = "KMSKeyInaccessible"
299300
statistic = "Maximum"
300301
treat_missing_data = "notBreaching"
@@ -317,7 +318,7 @@ locals {
317318
threshold = 3
318319
period = 10 * local.minute
319320

320-
namespace = "ES/OpenSearchService"
321+
namespace = "AWS/ES"
321322
metric_name = "5xx"
322323
statistic = "Maximum"
323324
treat_missing_data = "notBreaching"
@@ -340,7 +341,7 @@ locals {
340341
threshold = 100
341342
period = 1 * local.minute
342343

343-
namespace = "ES/OpenSearchService"
344+
namespace = "AWS/ES"
344345
metric_name = "ThreadpoolWriteQueue"
345346
statistic = "Average"
346347
treat_missing_data = "notBreaching"
@@ -362,7 +363,7 @@ locals {
362363
threshold = 500
363364
period = 1 * local.minute
364365

365-
namespace = "ES/OpenSearchService"
366+
namespace = "AWS/ES"
366367
metric_name = "ThreadpoolSearchQueue"
367368
statistic = "Average"
368369
treat_missing_data = "notBreaching"
@@ -384,7 +385,7 @@ locals {
384385
threshold = 5000
385386
period = 1 * local.minute
386387

387-
namespace = "ES/OpenSearchService"
388+
namespace = "AWS/ES"
388389
metric_name = "ThreadpoolSearchQueue"
389390
statistic = "Maximum"
390391
treat_missing_data = "notBreaching"
@@ -408,7 +409,7 @@ locals {
408409
threshold = 1
409410
period = 1 * local.minute
410411

411-
namespace = "ES/OpenSearchService"
412+
namespace = "AWS/ES"
412413
metric_name = "HotToWarmMigrationFailureCount"
413414
statistic = "Maximum"
414415
treat_missing_data = "notBreaching"

0 commit comments

Comments
 (0)