Skip to content

Commit

Permalink
fix dimensions, namespace (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
hong-yi authored Oct 25, 2024
1 parent 35ae6b2 commit 8dc7060
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions alarms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ locals {
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"

comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = 1
threshold = 1
evaluation_periods = 5
threshold = 5
period = 1 * local.minute

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "ClusterStatus.red"
statistic = "Maximum"
treat_missing_data = "notBreaching"
treat_missing_data = "breaching"

dimensions = {
DomainName = aws_opensearch_domain.this.domain_name
ClientId = data.aws_caller_identity.current.account_id
}
alarm_actions = var.alarm_actions
ok_actions = var.ok_actions
Expand All @@ -34,7 +35,7 @@ locals {
threshold = 1
period = 1 * local.minute

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "ClusterStatus.yellow"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -52,17 +53,18 @@ locals {
alarm_description = "${aws_opensearch_domain.this.domain_name} is blocking write requests"

comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = 1
threshold = 1
evaluation_periods = 5
threshold = 5
period = 1 * local.minute

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "ClusterIndexWritesBlocked"
statistic = "Maximum"
treat_missing_data = "notBreaching"
treat_missing_data = "breaching"

dimensions = {
DomainName = aws_opensearch_domain.this.domain_name
ClientId = data.aws_caller_identity.current.account_id
}
alarm_actions = var.alarm_actions
ok_actions = var.ok_actions
Expand All @@ -78,7 +80,7 @@ locals {
threshold = 1
period = 60 * local.minute * 24

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "Nodes"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -103,7 +105,7 @@ locals {
period = 15 * local.minute
unit = "Percent"

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "CPUUtilization"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -126,7 +128,7 @@ locals {
period = 15 * local.minute
unit = "Percent"

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "MasterCPUUtilization"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -150,7 +152,7 @@ locals {
period = 15 * local.minute
unit = "Percent"

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "WarmCPUUtilization"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -175,7 +177,7 @@ locals {
period = 15 * local.minute
unit = "Percent"

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "JVMMemoryPressure"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -198,7 +200,7 @@ locals {
period = 15 * local.minute
unit = "Percent"

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "OldGenJVMMemoryPressure"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -221,7 +223,7 @@ locals {
period = 15 * local.minute
unit = "Percent"

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "MasterJVMMemoryPressure"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -244,7 +246,7 @@ locals {
period = 60 * local.minute
unit = "Percent"

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "MasterOldGenJVMMemoryPressure"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -270,7 +272,7 @@ locals {
period = 1 * local.minute
unit = "Percent"

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "KMSKeyError"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -294,7 +296,7 @@ locals {
period = 1 * local.minute
unit = "Percent"

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "KMSKeyInaccessible"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -317,7 +319,7 @@ locals {
threshold = 3
period = 10 * local.minute

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "5xx"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -340,7 +342,7 @@ locals {
threshold = 100
period = 1 * local.minute

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "ThreadpoolWriteQueue"
statistic = "Average"
treat_missing_data = "notBreaching"
Expand All @@ -362,7 +364,7 @@ locals {
threshold = 500
period = 1 * local.minute

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "ThreadpoolSearchQueue"
statistic = "Average"
treat_missing_data = "notBreaching"
Expand All @@ -384,7 +386,7 @@ locals {
threshold = 5000
period = 1 * local.minute

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "ThreadpoolSearchQueue"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand All @@ -408,7 +410,7 @@ locals {
threshold = 1
period = 1 * local.minute

namespace = "ES/OpenSearchService"
namespace = "AWS/ES"
metric_name = "HotToWarmMigrationFailureCount"
statistic = "Maximum"
treat_missing_data = "notBreaching"
Expand Down

0 comments on commit 8dc7060

Please sign in to comment.