Monitoring Jump Start: SQS queue

Many applications depend on a message queue to exchange information. The message producers are decoupled from the message consumers. However, the producers rely on a consumer to eventual process the message. That’s why you need to add monitoring to be alerted if the message processing is not working or if messages are not processed fast enough. We created a CloudFormation template that you can use to monitor any SQS queue in a minute.

What do I have to monitor?

Each SQS queue sends metrics to CloudWatch that we can observe with CloudWatch Alarms. We recommend to create alarms for the following metrics:

  • ApproximateAgeOfOldestMessage
  • ApproximateNumberOfMessagesVisible

If a metric crosses the alarm’s threshold, you receive an alert in Slack.

Set up instructions

  1. Create the CloudFormation stack with a single click
    1. Ensure that you selected the AWS region of your SQS queue monitoring target
    2. Set the EndpointId parameter to the ID of your endpoint. You can get this value by asking @marbot for it on your Slack channel.
    3. Set the QueueName parameter to the name of your SQS queue.
    4. Review the threshold parameters
    5. Save by clicking the Create button.
      Monitoring Jump Start: SQS queue

That’s it. You are now monitoring your SQS queue.

Published on