Q: I know I can get alerted when there are messages in the dead-letter queue, but the alert is only raised once and does not go away until queue is cleared.  How can I find out if my number of messages in the dead-letter queue has increased?

A: This is relatively simply to accomplish in the following 3 steps:


  • Ensure that you have a metric that tracks number of messages in the dead-letter queue, say: DeadLetterQueueCount
  • Create a new metric that tracks number of messages from a previous monitoring cycle, say: PreviousDeadLetterQueueCount (screenshot attached)
    • Metric category: AggregatedMetric
    • Aggregation Method: PreviousValue
    • Source Metric: DeadLetterQueueCount
    • Aggregation Period: at least 5 minutes
  • Create an Alert that compares when DeadLetterQueueCount is bigger than PreviousDeadLetterQueueCount (ie: an expression such as this: DeadLetterQueueCount > PreviousDeadLetterQueueCount).  Be aware that this alert will fire once for a new deadletter and then turn "off" as soon as queue count from current monitoring cycle and previous one match to each other



That's it