Which alert gets triggered?

Mahdi 125 Reputation points
2024-07-07T02:44:45.9933333+00:00

Hi,

Let's say I've setup three alert rules for the same signal (e.g. a specific operation on virtual machine) on resource level, resource group level and subscription level. The resource is under the resource group and the subscription. When the condition is met, which alert gets triggered? All three alerts or only the one which is scoped at the resource level?

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,330 questions
0 comments No comments
{count} votes

Accepted answer
  1. akinbade abiola 18,715 Reputation points
    2024-07-07T08:42:06.3433333+00:00

    Hello Mahdi Azarboon,

    Thanks for your question.

    So far the conditions are met, all alert rules configured for that condition, regardless of their scope, will be triggered if they include the affected resource within their scope.

    Hence, in your scenario all three alerts can be triggered if the condition is met.

    Also, consider stateful and stateless alerts to tell if they will be triggered again.

    See: https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-overview#alerts-and-state

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Abiola

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Adharsh Santhanam 4,370 Reputation points
    2024-07-07T05:41:21.2833333+00:00

    Hello Mahdi Azarboon, alerts can be stateful or stateless.

    • Stateless alerts fire each time the condition is met, even if fired previously
    • Stateful alerts fire when the rule conditions are met, and will not fire again or trigger any more actions until the conditions are resolved

    Metric alerts are stateful by default, so other alerts aren't fired if there's already a fired alert on a specific time series. You would want to refer to a good FAQ on this -- https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-troubleshoot-metric

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

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.