Jautomator
Jautomator

Reputation: 149

Receive notifications when a user increase the SQL database size

We would like to receive notifications once the user change SQL Server size from S9 to S12 (increase). Is this possible natively or can we develop custom webhooks to receive notifications?

Upvotes: 1

Views: 123

Answers (3)

Anass Kartit
Anass Kartit

Reputation: 2088

Use the Usage and the RateCard APIs to get estimated cloud consumption and charges. Usage API will get you a metricID which you can use in query using RateCard to predict the price,

https://learn.microsoft.com/bs-cyrl-ba/azure/billing/billing-usage-rate-card-overview

Sample is here

Another Option would be to create custom Azure Policy to audit SQL SKUs and then create an alert once the resource is not compliant with the Azure policy to notify users.

https://learn.microsoft.com/en-us/azure/governance/policy/samples/allowed-sql-db-skus

Upvotes: 1

Michael Flanakin
Michael Flanakin

Reputation: 512

@silent's answer is probably the best option today. On top of this, you can also use Resource Graph to identify changes: https://learn.microsoft.com/en-us/azure/governance/resource-graph/how-to/get-resource-changes.

Upvotes: 0

silent
silent

Reputation: 16128

This action gets logged to the Activity Log. See here. So with this you should be able to create alerts following this tutorial: https://learn.microsoft.com/en-us/azure/azure-monitor/platform/alerts-activity-log

Upvotes: 3

Related Questions