Skip to content

azuregomez/AFBlobSave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless solution to get files from a remote FTP Server and save to Blob

Business Case

There are cases when business partners or internal applications integrate through an FTP Server and we have to get them to Azure Blob Storage. We would like to do that in an automated way.

Solution

This solution is an Azure Function that is scheduled every 5 minutes to:
  1. Login to an FTP Server and get existing files
  2. Save the files to a Blob Container
  3. Remove the copied files from the FTP Server
  4. Log activity to Log Analytics. You can get alerted on FTP failures and create file transfer dashboards.

    Query to alert on FTP failures for the last hour:

    FtpTransfer_CL
    | where Result_s != "Success" and TimeGenerated > ago(1h)

    Query for a dashboard with number of files and total GB transferred:

    FtpTransfer_CL
    | where Result_s == "Success" and TimeGenerated > ago(24h)
    | summarize Files = count(), GB = sum(Size_d)/1000000000
If 5 minutes is too often you can change the frequency.

Pre-requisites

  • A Log Analytics Workspace. Not a hard requirement as code graciously keeps going if there is no LA Workspace.
  • An Azure Function App that will host the function. Consumption plan is good enough.
  • A Storage Accounnt with a Blob Container to receive the files
  • Credentials from the remote FTP Server
  • A Rebex FTP client license. The code provided uses the Rebex SFTP Nuget package and needs a license key. You can get it here: https://www.rebex.net/sftp.net/

Comments

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages