How to trigger an alert in azure monitor when the particular condition is met continuously for a specific period(say 15 mins)?

Barani Dharan 25 Reputation points
2024-02-06T11:00:42.8033333+00:00

Hi Team, I am trying to set up DB metric alerts in azure monitor for a SQL DB. For Ex. Considering the CPU percentage metric, I want to trigger an alert only when the CPU percentage (Max) is breaching the threshold (90%) for 15 mins continuously. In other words, if the spike falls back within 15 mins, it should not trigger that alert. How to achieve it ? Can someone explain the same ? I am getting confused with the terms, 'Check every' and 'Lookback period' in alert condition section. Thanks in advance for your help.

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,360 questions
Azure SQL Database
{count} vote

Accepted answer
  1. Monalla-MSFT 13,036 Reputation points
    2024-02-06T19:22:38.1666667+00:00

    @Barani Dharan - Welcome to Microsoft Q&A and thanks for reaching out to us. In order to setup the metric alerts in Azure Monitor for SQL Database, please follow the this doc which provided you step by step instructions on how to create a metric alert and how to configure the alert logic : https://learn.microsoft.com/en-US/Azure/azure-monitor/alerts/tutorial-metric-alert#create-new-alert-rule.

    Check every defines how often the alert rule will check if the condition is met. Lookback period defines the time interval over which the collected values are aggregated.

    To trigger an alert only when the CPU percentage (Max) is breaching the threshold (90%) for 15 mins continuously, you need to set the "Check every" parameter to 5 minutes and the "Lookback period" parameter to 15 minutes.

    Then, you can set the "Aggregation type" to "Maximum" and the "Threshold value" to "90". You can also set the "Operator" to "Greater than" and the "Time aggregation" to "Total".

    Hope this helps. and please feel free to reach out if you have any further questions.


    If the above response was helpful, please feel free to "Accept as Answer" and click "Yes" so it can be beneficial to the community.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.