Skip to content

Instantly share code, notes, and snippets.

@ershad
Last active March 16, 2018 15:00
Show Gist options
  • Save ershad/5e9e5ec499fe3082ede1e57be09c95d1 to your computer and use it in GitHub Desktop.
Save ershad/5e9e5ec499fe3082ede1e57be09c95d1 to your computer and use it in GitHub Desktop.
resource "aws_cloudwatch_metric_alarm" "redis_eviction_alarm" {
alarm_name = "production-redis-high-eviction-rate"
comparison_operator = "GreaterThanThreshold"
evaluation_periods = "1"
period = "60"
metric_name = "Evictions"
dimensions {
CacheClusterId = "< Redis CluserId >"
}
namespace = "AWS/ElastiCache"
statistic = "Sum"
threshold = "0"
actions_enabled = "true"
alarm_actions = [ <alarm action> ]
alarm_description = "Monitors when production redis eviction rate > 0"
treat_missing_data = "missing"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment