Azure Storage Account Monitoring - file share free space

Michael Chan 6 Reputation points
2020-12-29T10:28:09.613+00:00

Hi everybody,

How can I set an alert on the free space on a Azure Storage Account file share, we have a storage account with 500GB, it is used by a web server that maps to the file share without a drive letter. It recently filled up and the website failed. If the file share was mapped with a drive letter then SCOM would have detected that the OS drive had dropped below 20% and alerted us, however this inherited system does not have a drive letter assigned to the mapping.

I can see in the Azure Alerts that I can set up a monitor for used space, but this is not dynamic, I can't set 80% for instance, just a specific value. I want to set an alert either based on a percentage free or used, or a set amount free, for example under 50GB.

I can't seem to find where to do this in a standard alert. You can do this in the Classic Alerts but there is a warning on the screen saying all Classic Alerts will stop working, and Metric Alerts only let me set a Used Capacity alert which isn't very useful as if I need to increase my capacity as I did, then I would also need to manually increase my alert, which is an accident waiting to happen.

Ideally I want to do the following. Set a single rule/alert for ANY storage account file share across the entire subscription(s) if the free space drops below 20%.

What is the best way to do this?

Regards,
Michael

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,160 questions
{count} vote

4 answers

Sort by: Most helpful
  1. JoyDutt 826 Reputation points
    2020-12-29T11:09:04.717+00:00

    51995-untitled.jpg

    1 person found this answer helpful.
    0 comments No comments

  2. JoyDutt 826 Reputation points
    2020-12-29T11:07:04.693+00:00

    Hi @Michael Chan

    On Portal -- Click All Services- Select-> "Monitor" --Select "Alerts" --> + New Alert Rule -->Select RESOURCE--> Storage Services --and Storage account name/file ---Click Done -- Now Add CONDITION--under File Share Capacity Quota Capacity metric Dimension Name - Threshhold Value (400Gb i.e 80% of 500GB)

    0 comments No comments

  3. Michael Chan 6 Reputation points
    2020-12-29T11:15:31.69+00:00

    Hi Joydeep, thank you for your answer but it isn't quite what I am looking for, I want to set it dynamically. I don't want to set it to 400GB (80%), and then when I increase my storage to 1TB, have to go and manually change the limit to 800GB. This is not a good way of doing things, I can't think of any other monitoring system or tool that doesn't allow the use of percentages, or at least has a metric for 'free space' as opposed to 'used space'.

    Also, surely there is a way of setting a global alert across ALL my storage accounts. If I had 100 storage accounts I shouldn't have to configure 100 alerts, that's very unproductive.


  4. Sumarigo-MSFT 46,206 Reputation points Microsoft Employee
    2020-12-29T15:56:05.25+00:00

    @Michael Chan Alerts would be set up via Azure Monitor. The azure monitor does not support setting a % threshold for now. You need to calculate the size/amount of free space and then set-up an alert for that amount.

    If you are looking for this kind of feature you may leave your feedback here All the feedback you share in these forums will be monitored and reviewed by the Microsoft engineering teams responsible for building Azure.

    Additional information:
    Event Grid for Blob, reacting with Event Grid on Files, checking contentLength and triggering alert based on threshold is most effective solution. Change Feeds on Files is another direction.

    Another path can be achieved today with Storage Logs + Log Analytics + Azure Alert. Azure Monitor logs for Storage supports Azure Files and include requestBodySize for upload operation. Customers can configure diagnostic setting to export logs to Log Analytics workspace. Then they can create Log alerts based on Log query based on requestBodySize. The pros is that these solutions are all native. The end to end latency is expected to be higher than Event Grid at minutes level. And customers also need to consider the price of Log Analytics based on their transaction volume.

    Nevertheless, it should be reasonable to use a Compute job to enumerate Files, check Content-Length with Get File Properties API and trigger an alert on threshold

    There is a new feature on Azure file share logging is currently in preview. To learn more, see: https://learn.microsoft.com/en-us/azure/storage/common/monitor-storage?tabs=azure-powershell#logs-in-azure-monitor-preview

    If you are interested in joining the preview, please complete the following form: https://forms.microsoft.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbRxW65f1VQyNCuBHMIMBV8qlUM0E0MFdPRFpOVTRYVklDSE1WUTcyTVAwOC4u

    You can also check the usage, quota and free space in Azure Storage Explorer
    52092-capture.png

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.

    -------------------------------------------------------------------------------------------------------------

    Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.