Skip to content

Commit

Permalink
Update OldestReplicationSlotLag for cloudposse module
Browse files Browse the repository at this point in the history
  • Loading branch information
dazza-codes committed Mar 2, 2023
1 parent ff38fe1 commit cb3aba4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions alarms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ locals {
"disk_queue_depth_too_high",
"freeable_memory_too_low",
"free_storage_space_threshold",
"oldest_replication_threshold",
"swap_usage_too_high"
])
}
Expand Down Expand Up @@ -141,7 +142,7 @@ resource "aws_cloudwatch_metric_alarm" "free_storage_space_too_low" {
}

resource "aws_cloudwatch_metric_alarm" "oldest_replication_too_high" {
alarm_name = "oldest_replication_too_high"
alarm_name = module.label["oldest_replication_too_high"].id
comparison_operator = "GreaterThanThreshold"
evaluation_periods = "1"
metric_name = "OldestReplicationSlotLag"
Expand All @@ -150,8 +151,8 @@ resource "aws_cloudwatch_metric_alarm" "oldest_replication_too_high" {
statistic = "Average"
threshold = local.thresholds["OldestReplicationThreshold"]
alarm_description = "Average database replication lag over last 10 minutes too high, disk may fill"
alarm_actions = [aws_sns_topic.default.arn]
ok_actions = [aws_sns_topic.default.arn]
alarm_actions = aws_sns_topic.default.*.arn
ok_actions = aws_sns_topic.default.*.arn

dimensions = {
DBInstanceIdentifier = var.db_instance_id
Expand Down

0 comments on commit cb3aba4

Please sign in to comment.