Edwin de Koning
Edwin de Koning

Reputation: 14387

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

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: enter image description here

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? enter image description here

Upvotes: 1

Views: 1605

Answers (3)

Danimir Ljepava
Danimir Ljepava

Reputation: 31

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

Upvotes: 0

Jarnstrom
Jarnstrom

Reputation: 477

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://learn.microsoft.com/en-us/azure/sql-database/sql-database-insights-alerts-portal

enter image description here

Upvotes: 1

Alberto Morillo
Alberto Morillo

Reputation: 15648

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 '[email protected]' -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.

Upvotes: 0

Related Questions