How can I programmatically find how much Azure Storage space I have consumed so far?

765 views Asked by At

There's a volume limitation per Azure Storage Account is 200 TB (two hundred terabytes). This sounds real large but if you store files in blob storage 25 megabytes each you can have about four million of them stored which is nice but not something impossible to exhaust.

I want to craft some code that would periodically check how much space I've used and raise an alert.

How can I programmatically find how much space I have already consumed in my storage account?

1

There are 1 answers

0
b2zw2a On

It looks like current limit for Azure Storage Account is 500TB (see here )

If you can have Azure Storage Account only with blobs in it you can use metrics to fetch current capacity, but current metrics are only showing capacity taken by blobs. See Storage Metrics documentation and how to enable Storage Analytics

Maybe this would help you http://www.amido.com/richard-slater/windows-azure-storage-capacity-metrics-with-powershell/

Not sure about that but it looks like you can create an alert in azure portal on this metric:

enter image description here