Alert configuration for AWS SQS Dead Letter Queue (DLQ)

Need help to configure the alerts for below metrics under SQS.

  1. Available messages in DLQ

  2. Number of messages received in DLQ

Hey @nagendrakunduri,

If you have the Amazon SQS monitoring integration | New Relic Documentation collecting data and sending it to New Relic, you should be able to query this data and set up a NRQL Alert Condition.

For “Available messages in DLQ > 5” you would use the approximateNumberOfMessagesVisible metric.

And for “Number of messages received in DLQ > 5” you would use the numberOfMessagesReceived metric.

Let us know if you have any questions about this.

Cheers!

Thank you @sudo
Need one clarification, are “Available Messages” & “Available messages in DLQ” represent the same in-terms of SQS?

Regards,
Nagendra

Hey @nagendrakunduri,

Dead-letter queues in Amazon SQS are treated like any other queue; in-fact, you create a normal queue in Amazon SQS before designating it as a dead-letter queue.

So, in this case, when you query for this data you would first specify the name of the dead-letter queue using the queue attribute and then query for the number of available messages.

Hope this helps!

Hi @sudo
I have a similar question and I created an alert based on the NRQL provided in this thread, but I am unable to get this alert to actually fire as an incident, even though the alert itself knows its in a Critical Violation. I haven’t had any luck with getting any alerts to fire when my data is sources from QueueSample… any ideas?

NRQL I am using:

SELECT count(*) from QueueSample WHERE providerAccountName=‘aws-vbuordermanagement’ and provider.queueName =‘order-email-trigger-dev-dlq’ AND provider.approximateNumberOfMessagesVisible.Average > 0

Heres a screenshot of the config for this alert:

Hey @jonhines,

It’s hard to tell what’s going on by only looking at the screenshot. A permalink would help:

You can create a permalink by clicking share or the three-dot share icon in the top right of the page. This will allow for a New Relic employee to view the exact account, page, and time period you are viewing. Here is a document that explains this in more detail: https://docs.newrelic.com/whats-new/share-dashboards-curated-views-permalinks

However, if I had to take a guess, this might be related to Amazon SQS’s polling delay and your condition’s evaluation offset. I’d suggest setting the condition to a 10 minute evaluation offset and see if that helps.

Here is a doc about Amazon SQS polling delays: Amazon SQS monitoring integration | New Relic Documentation

Cheers!