Skip to content

Azure Function that monitors log files in a Blob Storage container. It identifies file download events based on logs, and deletes the downloaded files from an Azure File Share. The function is triggered by a timer, running at regular intervals

Notifications You must be signed in to change notification settings

sherweb/MonitorAzureFileLogs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MonitorAzureFileLogs

The MonitorFileLogs function is designed to monitor logs within a specific Blob Storage container, particularly logs generated from Azure Storage Analytics. These logs capture file access events, such as file downloads, from an Azure File Share. The function is triggered at regular intervals using a timer (configurable in the local.settings.json file), and upon execution, it scans the logs to identify files that have been downloaded.

Once download events are detected, the function extracts the folder and file names from the log entries and attempts to delete the corresponding files from the Azure File Share. This automated process helps manage file lifecycle by removing files once they have been accessed. The function integrates with both Blob Storage for log reading and Azure File Share for file deletion, while logging all actions taken, including any errors encountered.

This solution ensures efficient post-download file cleanup and assists in maintaining storage hygiene.

About

Azure Function that monitors log files in a Blob Storage container. It identifies file download events based on logs, and deletes the downloaded files from an Azure File Share. The function is triggered by a timer, running at regular intervals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages