Azure Blob Storage Container Files

Kranthi 0 Reputation points
2024-12-24T15:08:56.57+00:00

Hi, Is their a way to monitor a blob storage container has received a file and then also monitor if the file is in archived folder once it has been processed?

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,295 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,003 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. mukeshkumar korrapati 6 Reputation points
    2024-12-24T15:12:27.72+00:00

    Hello Kranti,

    You can create a custom KQL query to fetch the relevant logs and enable alerts using that query. Run the query in the Log Analytics workspace to retrieve the desired logs, and then set up alerts based on the query results.


  2. mukeshkumar korrapati 6 Reputation points
    2024-12-24T15:31:20.7266667+00:00

    Hello Kranthi,

    try this

    StorageBlobLogs

    | where OperationName == "PutBlob" or OperationName == "PutBlockList"

    | where ContainerName == "your-container-name"

    | project TimeGenerated, BlobName, ContainerName, CallerIpAddress, ResultType, RequestId

    | order by TimeGenerated desc

    StorageBlobLogs

    | where OperationName == "PutBlob" or OperationName == "PutBlockList"

    | where ContainerName == "your-container-name" and BlobName startswith "archive/"

    | project TimeGenerated, BlobName, ContainerName, CallerIpAddress, ResultType, RequestId

    | order by TimeGenerated desc

    let me know if this works or i will work on it.

    0 comments No comments

  3. Amrinder Singh 5,555 Reputation points Microsoft Employee
    2024-12-24T16:42:16.2+00:00

    Hi Kranthi - Thanks for reaching out over Q&A Forum

    In order to check for operation happening on the account, you need to first enable the diagnostic logging on the account.

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

    Once done, you can then leverage the KQL queries in order query as per your operation requirement.

    Hope that helps!

    Please do not 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

  4. Vinod Kumar Reddy Chilupuri 1,915 Reputation points Microsoft Vendor
    2024-12-24T17:02:57.5966667+00:00

    Hi @Kranthi

    Welcome to Microsoft Q&A, thanks for posting your query.

    Adding additional information for the above answer.

    Yes, you can monitor a blob storage container for file uploads and track the movement of files to an archived folder after processing.

    To monitor when a file is uploaded to a blob storage container, you can use Azure Event Grid. Blob storage events are pushed using Azure Event Grid to subscribers such as Azure Functions, Azure Logic Apps, or even to your own http listener. Event Grid provides reliable event delivery to your applications through rich retry policies and dead lettering.

    This service allows you to react to events such as the creation of blobs in your storage container. By setting up an event subscription, you can trigger Azure Functions or other services to execute code in response to these events.

    Once a file has been processed, you can move it to an archived folder within the blob storage. You can continue to monitor this archived folder using similar event-driven architecture to detect when files are moved or accessed.

    Reacting to Azure Blob storage events | Microsoft Learn
    https://learn.microsoft.com/en-us/azure/azure-functions/functions-event-grid-blob-trigger?pivots=programming-language-csharp

    Hope the above answer helps! Please let us know do you have any further queries.


    Please do not 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.