< Back

Integration: Amazon ElastiCache Notification

Amazon ElastiCache provides in-memory databases such as Redis or memcached. ElastiCache Event Notifications are published when significant events happen on a cache cluster. An event can be the start of an automated backup, a failover to a replica, or much more. You can get either all event types or none; there is no filter feature available in ElastiCache. That’s why marbot filters them.

Event filter

Alerts are only triggert for the following event names:

  • ElastiCache:AddCacheNodeFailed
  • ElastiCache:CacheClusterProvisioningFailed
  • ElastiCache:CacheClusterRestoreFailed
  • ElastiCache:CacheClusterScalingFailed
  • ElastiCache:CreateReplicationGroupFailed
  • ElastiCache:ReplicationGroupScalingFailed
  • ElastiCache:SnapshotFailed
  • ElastiCache:NodeReplacementCanceled
  • ElastiCache:NodeReplacementRescheduled
  • ElastiCache:NodeReplacementScheduled
  • ElastiCache:CacheNodeReplaceComplete
  • ElastiCache:CacheNodesRebooted
  • ElastiCache:FailoverComplete

Monitoring Multi-AZ failovers

You can run the Redis cluster in Multi-AZ with Auto-Failover mode. Multi-AZ will use at least two virtual machines to host your cluster (primary and replicas). The replicas keep the same data in-memory as the primary. If the primary goes down, AWS will failover to one of the secondaries. But this will take up to 6 minutes. You may want to know about this event because it will cause connection errors in your applications.

Enabling ElastiCache Notifications

  1. Visit https://console.aws.amazon.com/elasticache/home?region=us-east-1
  2. Click on the Redis link on the left
  3. Select your Redis cluster
  4. Click on the Modify button
  5. Set *Enabling ElastiCache Notifications to marbot or your other SNS topic name
  6. Enable Apply immediately
  7. The other fields can stay as they are
  8. Save by clicking the Modify button.
    Enabling ElastiCache Notifications

Sample Alert

You can simulate a failover with the AWS CLI. Replace the following value in the command below:

  • REPLICATION_GROUP_ID with the name of the Redis cluster
aws --region us-east-1 elasticache test-failover --replication-group-id REPLICATION_GROUP_ID --node-group-id 0001

You should receive an alert in Slack:

ElastiCache Notification

More help needed? Or want to share feedback?

If you experience any issues, let us know.

E-mail icon
E-Mail
marbot teaser

Chatbot for AWS Monitoring

Configure monitoring for Amazon Web Services: CloudWatch, EC2, RDS, EB, Lambda, and more. Receive and manage alerts via Slack. Solve incidents as a team.

Slack
Add to Slack
Microsoft Teams
Add to Teams