I have a storage account with 5 containers or blobs, and I want to know which container is accessed the most by the user. Using the url of the blob, can I get this information?

Anandkumar Rambriksh Yadav 1 Reputation point
2023-04-13T05:24:38.2666667+00:00

I have a storage account with 5 containers or blobs, and I want to know which container is accessed the most by the user. Using the url of the blob, can I get this information?

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.
2,944 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,639 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 19,032 Reputation points Microsoft Employee
    2023-04-14T08:43:04.8133333+00:00

    @Anandkumar Rambriksh Yadav Thanks for posting your query on Microsoft Q&A.

    You can use Azure Monitor to monitor your storage account and get metrics data for your containers. Metrics enable you to identify usage trends, trace requests, and diagnose problems with your storage account.

    Transaction metrics are sent to Azure Monitor every minute, and they're available for both the account and the service. All transaction metrics are available at both account and Blob storage service level.

    https://learn.microsoft.com/en-us/azure/storage/blobs/monitor-blob-storage?tabs=azure-portal#analyzing-metrics

    Monitor the use of a container: You can evaluate traffic at the container level by querying logs.

    Here's a query to get the number of read transactions and the number of bytes read on each container.

    StorageBlobLogs
    | where OperationName  == "GetBlob"
    | extend ContainerName = split(parse_url(Uri).Path, "/")[1]
    | summarize ReadSize = sum(ResponseBodySize), ReadCount = count() by tostring(ContainerName)
    

    Reference document: https://learn.microsoft.com/en-us/azure/storage/blobs/blob-storage-monitoring-scenarios#monitor-the-use-of-a-container

    If you have any questions at all, please let me know in the "comments" and I would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer below helped clarify the issue and steered you in the right direction, please 'Accept answer' and 'mark as helpful', which would help increase visibility of this question for other members of the Microsoft Q&A community. User's image

    1 person found this answer helpful.
    0 comments No comments