Skip to content

Commit

Permalink
add for cluster writes blocked alarm
Browse files Browse the repository at this point in the history
  • Loading branch information
hong-yi committed Oct 25, 2024
1 parent db23abe commit 11c6a13
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions alarms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ locals {
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
Expand Down Expand Up @@ -53,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 = "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 Down

0 comments on commit 11c6a13

Please sign in to comment.