Creating an alert rule for every new Deadletters in service bus

Guy Green 0 Reputation points
2024-11-27T14:24:11.9666667+00:00

I'm trying to create a new alert rule that will send an email every time a new dead letter appears in my topics in the service bus.

Initially, I tried searching for a solution at the subscription level so I could choose which subscriber to monitor for each topic, but I couldn't manage to set it up (is this possible? I tried querying).

After that, I realized there is a default condition I can use, which triggers an alert whenever there are more than x dead letters (in my case, 1). This worked at first, but then I noticed that the alert triggers only once when the threshold is exceeded. For example, if I get a new dead letter (let's say the third one), it does not trigger another alert, even though (and because actually) the count is still above the threshold. Unfortunately, I can’t reset it immediately every time.

So:

Is there a way to make the alert trigger for every single new dead letter?

Is there a way to configure the rule at the subscription level rather than just at the topic level?

Thank you very much!

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,363 questions
Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
649 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Stanislav Zhelyazkov 25,306 Reputation points MVP
    2024-11-28T07:55:14.8633333+00:00

    Hi,

    You have setup your alert as stateful alert which means that the alert will be triggered only the first time the threshold is met, if the threshold continues to be met no new alert instances will be generated until the threshold is no longer met and the alert instance is resolved and new cycle begins. From your description it seems you want stateless alert to trigger new alert instance every time the threshold is met. In such case you should disable automatically resolve alerts.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.