Skip to content

cloudwatch alarm for nodes having <= 25% free storage space #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion alarms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ locals {

data_high_oldjvm_pressure = {
alarm_name = "${aws_opensearch_domain.this.domain_name}_data_high_oldgenjvm_pressure"
alarm_description = "high old gen jvm pressure on aos warm nodes"
alarm_description = "high old gen jvm pressure on aos data nodes"

comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = 3
Expand Down Expand Up @@ -260,6 +260,28 @@ locals {
}
# /jvmpressure

# storage
free_storage_space = {
alarm_name = "${aws_opensearch_domain.this.domain_name}_free_storage_space"
alarm_description = "Free storage space is <= 25% for a node"

comparison_operator = "LessThanOrEqualToThreshold"
evaluation_periods = 1
threshold = 0.25 * (var.ebs_volume_size * 1024)
period = 5 * local.minute
namespace = "AWS/ES"
metric_name = "FreeStorageSpace"
statistic = "Minimum"
treat_missing_data = "notBreaching"

dimensions = {
DomainName = aws_opensearch_domain.this.domain_name
}
alarm_actions = var.alarm_actions
ok_actions = var.ok_actions
insufficient_data_actions = var.insufficient_data_actions
}

# kms
aos_key_error = {
create_metric_alarm = var.encrypt_kms_key_id != null
Expand Down