How can I configure metric alerts for a SQL Azure Database?

azure sql database alerts
how is azure sql database auditing configured?
azure sql database metrics
in relation to azure sql database firewall rules, which of the following is true?
azure alerts
which of the following tools can be used to connect to azure sql database?
you have enabled database threat detection. which of the following is not a threat detection type?
azure sql database log io percentage

I am trying to configure an alert on the 'CPU Percentage' metric of my SQL Azure database. Since the classic Alerts functionality of Azure will be retired soon, I am trynig the new Alerts experience:

However, when I select my database and then try to define the alert criteria, it shows no metric signals at all, only Activity Log signals. Am I doing something wrong here, or is it just not possible anymore in the new Azure Alerts functionality?

Try using PowerShell to create an alert for DTU consumption:

$ResourceGroup = 'IntroAzureSql'
$location = 'West US'
$server = 'msf-sqldb'
$db = 'MSFADMIN'
$rid = (Get-AzureRmResource -ResourceGroupName $ResourceGroup -ResourceName "$server/$db").ResourceID
$email = New-AzureRmAlertRuleEmail -CustomEmails 'mfal@dummy.com' -SendToServiceOwners
Add-AzureRmMetricAlertRule -Name 'DTU90Check' <code>
-Location $location </code>
-ResourceGroup $ResourceGroup <code>
-TargetResourceId $rid </code>
-MetricName 'dtu_consumption_percent' <code>
-Operator GreaterThanOrEqual </code>
-Threshold 90 <code>
-WindowSize '00:05:00' </code>
-TimeAggregationOperator Maximum `
-Actions $email

For more information, please read this article.

Setup alerts and notifications (Azure portal), Create an alert rule on a metric with the Azure portal. In the portal, locate the resource you are interested in monitoring and select it. Select Alerts in the Monitoring section. Select the New alert rule button to open the Create rule page. In the Condition section, click Add. I am trying to configure an alert on the 'CPU Percentage' metric of my SQL Azure database. Since the classic Alerts functionality of Azure will be retired soon, I am trynig the new Alerts experience: However, when I select my database and then try to define the alert criteria, it shows no metric signals at all, only Activity Log signals.

Next generation metrics/alert for Azure SQL has not yet been published so you only have "Classic" at this moment. It will go live during 2019 so just keep an eye out for when it arrives.

https://docs.microsoft.com/en-us/azure/sql-database/sql-database-insights-alerts-portal

How is Azure SQL Database Auditing configured?, Which of the following tools can be used to connect to Azure SQL Database? Azure Monitor REST API; Create an alert rule on a metric from the Azure portal. In the Azure portal, select the Azure Database for MySQL server you want to monitor. Under the Monitoring section of the sidebar, select Alerts as shown: Select Add metric alert (+ icon). The Create rule page opens as shown below. Fill in the required information: Within the Condition section, select Add condition. Select a metric from the list of signals to be alerted on. In this example, select "Storage percent".

I've just followed up with a team in charge of this. Once new alerts are available (in 2019), all existing classic alerts should be automatically migrated from the old classic into the new alerting system with no user action required.

The team will also look into removing this generic message from the alerts section for SQL Database as no action is needed.

Thank you once again on your feedback, appreciate it.

-Dani

Azure SQL Database

Setup alerts and notifications for Managed Instance (Azure portal , Use the Azure portal to create SQL Managed Instance alerts, which Alerting metrics for individual databases in managed instance are not  To select any other Azure SQL Database, click on the Select button and then choose the available Azure SQL Database. Condition, is where you define the alert metric and the alert logic. For example, CPU is the metric and the logic define the threshold values for the alert to be triggered.

How can I configure metric alerts for a SQL Azure Database?, Try using PowerShell to create an alert for DTU consumption: $ResourceGroup = 'IntroAzureSql' $location = 'West US' $server = 'msf-sqldb'  I've been trying to configure Azure SQL Database metric alerts as described on this page, but they don't seen to exist anymore. If I select a SQL DB in the Azure portal there is no "Alert rules" option under Monitoring, there is only "Alerts (Classic)" and if I select that there is a greyed out button labeled "Add metric alert (classic)" and

Configuring Database Alerts for Azure SQL Database , This article will help us to understand how to monitor Azure SQL Database and set up Azure metric alerts. Even though the database in Azure  Create, view, and manage metric alerts using Azure Monitor. 03/13/2020; 5 minutes to read +4; In this article. Metric alerts in Azure Monitor provide a way to get notified when one of your metrics crosses a threshold. Metric alerts work on a range of multi-dimensional platform metrics, custom metrics, Application Insights standard and custom

Creating Alerts to Monitor an Azure SQL Database, The Alerts is where you create alerts, Metrics provide you live monitoring capabilities. Diagnostic setting allows you to select and log the data for  You can configure alerts if metrics exceed or fall below a certain threshold over a time period – click “Alerts (Classic)” under “Monitoring”. Use SQL dynamic management views (DMV): The two main one’s are sys.resource_stats in the logical master database of your server, and sys.dm_db_resource_stats in the user database.

Comments
  • Almost right... I was asking for CPU Percentage, but the linked article helped me to the answer. Add-AzureRmMetricAlertRule -Name 'Percentage CPU Greater than 80' -Location 'West Europe' -ResourceGroup $ResourceGroup -TargetResourceId $rid -MetricName 'cpu_percent' -Operator GreaterThan -Threshold 80 -WindowSize '00:05:00' -TimeAggregationOperator Average -Actions $email. Please update your answer, so I can accept it.
  • I'm glad for you!
  • @EdwindeKoning screenshot you have in the question is from new alert (Azure Monitor--> alert). Creating the same using Add-AzMetricAlertRule or Add-AzureRmMetricAlertRule with old module still create the alert under classic. Is that what you are seeing and how did you get around this?