Need to download a zip file from a website and unzip it and call its content in Log Analytics worksp

%3CLINGO-SUB%20id%3D%22lingo-sub-1222811%22%20slang%3D%22en-US%22%3ENeed%20to%20download%20a%20zip%20file%20from%20a%20website%20and%20unzip%20it%20and%20call%20its%20content%20in%20Log%20Analytics%20worksp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1222811%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3BHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20want%20to%20download%20a%20zip%20file%20from%20an%20external%20website%20and%20unzip%20the%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20unzipped%20file%20contains%204%20different%20excel%20which%20I%20want%20to%20read%20and%20write%20data%20to%20Sentinel.%20How%20can%20I%20achieve%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnce%20I%20get%20these%20excel%20files%2C%20I%20want%20these%20to%20be%20reference%20to%20txt%20files%20contained%20in%20BLOBs%20which%20will%20be%20referenced%20in%20rules%20in%20Sentinel.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20help.%20I%20am%20very%20new%20to%20Azure%20Sentinel%20and%20Azure%20cloud.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EMitesh%20Agrawal%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1222811%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ENetworking%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1222978%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20download%20a%20zip%20file%20from%20a%20website%20and%20unzip%20it%20and%20call%20its%20content%20in%20Log%20Analytics%20wo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1222978%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F539205%22%20target%3D%22_blank%22%3E%40MiteshAgrawal%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20see%20examples%20in%20the%20%5BAzure-Sentinel%5D%20channel%2C%20posts%20like%20this%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sentinel%2Fmapping-ips-to-autonomous-systems-number-and-name%2Fm-p%2F1204314%23M1127%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sentinel%2Fmapping-ips-to-autonomous-systems-number-and-name%2Fm-p%2F1204314%23M1127%3C%2FA%3E%26nbsp%3Band%20the%20link%20contained%20within%2C%20explain%20the%20use%20of%20Externaldata%20for%20ingesting%20files%20from%20URLs%20or%20BLOB.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1223090%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20download%20a%20zip%20file%20from%20a%20website%20and%20unzip%20it%20and%20call%20its%20content%20in%20Log%20Analytics%20wo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1223090%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Clive%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20link%20is%20quite%20helpful.%20Actually%20I%20want%20to%20automate%20the%20task%20which%20I%20have%20mentioned.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20zip%20file%20should%20be%20downloaded%20everyday%20and%20it%20should%20be%20unzipped.%20Later%20I%20can%20call%20the%20csvs%20using%20externaldata%20and%20create%20rules.%20But%20how%20to%20achieve%20the%20first%20thing.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EMitesh%20Agrawal%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1223104%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20download%20a%20zip%20file%20from%20a%20website%20and%20unzip%20it%20and%20call%20its%20content%20in%20Log%20Analytics%20wo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1223104%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F539205%22%20target%3D%22_blank%22%3E%40MiteshAgrawal%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'd%20start%20looking%20at%20a%20Logic%20App%20-%20which%20has%20a%20schedule%20(recurrence%20option)%20to%20allow%20you%20to%20schedule%20and%20then%20move%20the%20file%20to%20blob%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fen-US%2F5643f6de-0c2b-4697-9b72-8307a6447db6%2Fdownload-payload-of-file-at-http-connector-to-blob-storage%3Fforum%3Dazurelogicapps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fen-US%2F5643f6de-0c2b-4697-9b72-8307a6447db6%2Fdownload-payload-of-file-at-http-connector-to-blob-storage%3Fforum%3Dazurelogicapps%3C%2FA%3E%26nbsp%3B%20%26nbsp%3BNote%3A%20I've%20not%20tried%20this.%3C%2FP%3E%0A%3CP%3EIts%20the%20unzip%20operation%20I'm%20not%20sure%20about...%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20Clive%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1223201%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20download%20a%20zip%20file%20from%20a%20website%20and%20unzip%20it%20and%20call%20its%20content%20in%20Log%20Analytics%20wo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1223201%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20exploring%20the%20option%20for%20Logic%20App.%20Used%20%22Recurrence%22%2C%20%22HTTP%22%20and%20Azure%20Blob%20storage%20connectors%20and%20created%20a%20blob%20with%20the%20zip%20file.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20a%20lot%20for%20the%20link.%20It%20helped%20a%20lot.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%2C%20I%20am%20looking%20for%20an%20option%20to%20unzip%20this%20zip%20file%20and%20create%204%20more%20blobs%20from%20those%204%20excel%20sheets%20in%20the%20zip%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20get%20to%20know%20anything%20then%20please%20update%20here.%20Also%2C%20if%20you%20have%20any%20other%20idea%20on%20achieving%20this%20then%20please%20tell%20me.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EMitesh%20Agrawal%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1223264%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20download%20a%20zip%20file%20from%20a%20website%20and%20unzip%20it%20and%20call%20its%20content%20in%20Log%20Analytics%20wo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1223264%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239477%22%20target%3D%22_blank%22%3E%40Clive%20Watson%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20got%20the%20below%20error%20when%20I%20tried%20to%20unzip%20the%20file.%3C%2FP%3E%3CP%3E%60%60%60%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22status%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E413%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22message%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22The%26nbsp%3Bfile%26nbsp%3Bcontains%26nbsp%3B50.5%26nbsp%3Bmegabytes%26nbsp%3Bwhich%26nbsp%3Bexceeds%26nbsp%3Bthe%26nbsp%3Bmaximum%26nbsp%3B50%26nbsp%3Bmegabytes.%5Cr%5CnclientRequestId%3A%26nbsp%3Babcd%22%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22error%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22message%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22The%26nbsp%3Bfile%26nbsp%3Bcontains%26nbsp%3B50.5%26nbsp%3Bmegabytes%26nbsp%3Bwhich%26nbsp%3Bexceeds%26nbsp%3Bthe%26nbsp%3Bmaximum%26nbsp%3B50%26nbsp%3Bmegabytes.%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%7D%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22source%22%3C%2FSPAN%3E%3CSPAN%3E%3A%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%22azureblob-ci.azconn-ci.p.azurewebsites.net%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%60%60%60%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EHow%20can%20I%20increase%20this%20limit%3F%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EBy%20the%20way%20I%20got%20an%20option%20under%20Logic%20App%20connector%20-%20%22Extract%20Archive%20to%20Folder%22%20in%20order%20to%20unzip%20the%20.zip%20file.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3ERegards%2C%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EMitesh%20Agrawal%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1224243%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20download%20a%20zip%20file%20from%20a%20website%20and%20unzip%20it%20and%20call%20its%20content%20in%20Log%20Analytics%20wo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1224243%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F539205%22%20target%3D%22_blank%22%3E%40MiteshAgrawal%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20believe%20that%20is%20a%20hard%20limit.%26nbsp%3B%20Other%20options%20(from%20a%20quick%20search%2C%20so%20there%20maybe%20other%20ways)%20seem%20to%20be%20to%20use%20a%20Azure%20Function%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Fwww.frankysnotes.com%2F2019%2F02%2Fhow-to-unzip-automatically-your-files.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.frankysnotes.com%2F2019%2F02%2Fhow-to-unzip-automatically-your-files.html%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

 Hi All,

 

I want to download a zip file from an external website and unzip the file.

 

The unzipped file contains 4 different excel which I want to read and write data to Sentinel. How can I achieve this?

 

Once I get these excel files, I want these to be reference to txt files contained in BLOBs which will be referenced in rules in Sentinel.

 

Please help. I am very new to Azure Sentinel and Azure cloud.

 

Regards,

Mitesh Agrawal

6 Replies

@MiteshAgrawal 

 

You can see examples in the [Azure-Sentinel] channel, posts like this https://techcommunity.microsoft.com/t5/azure-sentinel/mapping-ips-to-autonomous-systems-number-and-n... and the link contained within, explain the use of Externaldata for ingesting files from URLs or BLOB.

 

Thanks 

Hi Clive,

 

The link is quite helpful. Actually I want to automate the task which I have mentioned.

 

The zip file should be downloaded everyday and it should be unzipped. Later I can call the csvs using externaldata and create rules. But how to achieve the first thing.

 

Regards,

Mitesh Agrawal

@MiteshAgrawal 

 

I'd start looking at a Logic App - which has a schedule (recurrence option) to allow you to schedule and then move the file to blob https://social.msdn.microsoft.com/Forums/en-US/5643f6de-0c2b-4697-9b72-8307a6447db6/download-payload...   Note: I've not tried this.

Its the unzip operation I'm not sure about...

 

 

Thanks Clive 

Hi @Clive Watson,

 

I am exploring the option for Logic App. Used "Recurrence", "HTTP" and Azure Blob storage connectors and created a blob with the zip file. 

 

Thanks a lot for the link. It helped a lot. 

 

Now, I am looking for an option to unzip this zip file and create 4 more blobs from those 4 excel sheets in the zip file.

 

If you get to know anything then please update here. Also, if you have any other idea on achieving this then please tell me.

 

Regards,

Mitesh Agrawal

Hi @Clive Watson ,

 

I got the below error when I tried to unzip the file.

```

{
  "status"413,
  "message""The file contains 50.5 megabytes which exceeds the maximum 50 megabytes.\r\nclientRequestId: abcd",
  "error": {
    "message""The file contains 50.5 megabytes which exceeds the maximum 50 megabytes."
  },
  "source""azureblob-ci.azconn-ci.p.azurewebsites.net"
```
How can I increase this limit?
 
By the way I got an option under Logic App connector - "Extract Archive to Folder" in order to unzip the .zip file.
 
Regards,
Mitesh Agrawal

@MiteshAgrawal 

 

I believe that is a hard limit.  Other options (from a quick search, so there maybe other ways) seem to be to use a Azure Function http://www.frankysnotes.com/2019/02/how-to-unzip-automatically-your-files.html