How to create a dashboard that shows the amount of storage left in a storage account? I don't want to create alerts but I want to create a tile in the dashboard that either show one of the following:
the amount of storage used by the storage account against its quota, hence some sort of percentage
The amount of remaining storage space
The amount of remaining storage space as a percentage
Thanks to @Norrin Rad. By referring to this, I have written a query for storage availability below:
AzureMetrics
| where TimeGenerated > ago(timespan) //(eg:24 hrs)
| where ResourceProvider == "MICROSOFT.STORAGE"
| where _ResourceId contains "storage"
| where MetricName =~ "availability"
| project
TimeGenerated,
ResourceGroup,
SubscriptionID,
Resource, //(Here it is storage account)
MetricName,
Average,
UnitName
Go to Azure portal and follow these steps:
Monitor->Logs->Write a query->save it
After running the query, you will be able to see the logs as shown below:
After successfully executing the query, You will be able to pin it to your dashboards.
Note: While saving the query make sure that you need to save content to azure storage account also by assigning user managed identity with the role "Storage Blob data contributor" (Eg: Blob storage)