snaketail-net icon indicating copy to clipboard operation
snaketail-net copied to clipboard

Make SnakeTail able to tail on Azure file storage

Open mollerhansen opened this issue 4 years ago • 5 comments

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

mollerhansen avatar Oct 17 '19 08:10 mollerhansen

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

snakefoot avatar Oct 17 '19 10:10 snakefoot

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.

mollerhansen avatar Oct 17 '19 13:10 mollerhansen

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 avatar Oct 21 '19 20:10 snakefoot

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

snakefoot avatar Oct 21 '19 20:10 snakefoot

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.

mollerhansen avatar Oct 22 '19 12:10 mollerhansen