Azure : how can know about Storage blob upload in my ACI

90 Views Asked by At

I am new to Azure programming. I have a service running as Azure ACI. This service process if there is a file available in c:\data\input and writes processed c:\data\output. I will have file uploaded to blob storage https://sreestorage.blob.core.windows.net/SStorageContainer

Is there a way that I can get notification about File upload? SO that I can download the file to c:\data\input.

Thanks Santhi

1

There are 1 best solutions below

0
On

Is there a way that I can get notification about File upload? SO that I can download the file to c:\data\input.

Follow the steps below to get an alert when you upload a file to an Azure storage container.

  1. Create an Log Analytics Work Space, follow the Ms Doc
  2. Go to Azure Portal > Select your Storage Account > Diagnostic settings > Blob > Add diagnostic setting

enter image description here

  1. Please wait for some time to allow all Storage account transaction data to be sent to the Log Analytics workspace

  2. Go to Log analytics work space > Logs and run below KQL Query

    StorageBlobLogs
    | where OperationName == "PutBlob"
    | project AccountName, Uri, ServiceType, OperationName,ObjectKey

Output:

enter image description here

  1. Click New Alert Rule and select the measurement according to your requirements.
  2. Create an Action Group, and if it has already been created, select the same Action Group and provide the Email ID details in the Condition to receive an email

enter image description here

  1. After creating an alert, when you upload a file to the Storage account, you will receive an email alert, and the same alert will be reflected in the Portal

enter image description here

An alert for the uploaded file has been received at the registered email, like below.

enter image description here