Use the Azure Monitor service with a Kusto Query Language (KQL) to query the "UsedCapacity" metric of your storage account
AzureMetrics
| where ResourceProvider == "MICROSOFT.STORAGE"
| where MetricName == "UsedCapacity"
| where SubscriptionId == "<YourSubscriptionId>"
| summarize arg_max(TimeGenerated, ResourceGroup, Resource, Average) by _ResourceId
You can create an alert rule based on the results of the above query.
- Azure Monitor > Log Analytics Workspace > Queries > Alerts
- Run your query and once you have verified your query, click on "New alert rule"
- On the Condition tab, the Log query will be filled in.
- Configure the Operator and Threshold value in the alert logic section.
- Set up Action groups that define a set of actions to take when an alert is fired
- In the Alert rule details section set the details
- Create alert rule