snakefoot / snaketail-net

Tail utility for monitoring text log files and Windows EventLog
http://snakenest.com/snaketail/
GNU General Public License v3.0
398 stars 78 forks source link

Make SnakeTail able to tail on Azure file storage #136

Open mollerhansen opened 5 years ago

mollerhansen commented 5 years ago

Problem

We've started to log to Azure file storage, where we use Azure Storage Explorer to open log files, they are downloaded and opened, and thus not tailed.

Solution

Build support for tailing log files on Azure file storage in SnakeTail.

Detail

https://docs.microsoft.com/en-us/azure/storage/files/storage-dotnet-how-to-use-files

snakefoot commented 5 years ago

Do you have SMB access to the files? If not where should authentication details be stored/retrieved from?

mollerhansen commented 5 years ago

Good question. We use Azure storage explorer today, where we login with our O365 account. Not sure if you can prompt the same way to get credentials, my guess is that its using some sort of REST based web call with OAuth.

snakefoot commented 5 years ago

Do you create new log files for each day, so tail application has to scan regularly for new files? What is the name-convention of the file-blobs? Using sub-folders?

Sounds like the tail application also need to implement a blob-browser to select the blob-name to tail.

snakefoot commented 5 years ago

Looks like there is a primary and secondary access key to a blob-storage-account. But it is not recommended to store these keys anywhere. And they are hard to remember by nature, so not easy to type in every time.

Are you using Azure AD to give right to those that have access to Azure Blob Storage Resources:

https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad

mollerhansen commented 5 years ago

We store the log files over days until some log roll threshold in File Shares probably in and underlying Blob Containers. I connect via the Azure Storage Explorer tool using my AAD (O365) account. I have multiple subscriptions on my account.