Home

How to access kusto logs from a different service

%3CLINGO-SUB%20id%3D%22lingo-sub-797257%22%20slang%3D%22en-US%22%3EHow%20to%20access%20kusto%20logs%20from%20a%20different%20service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-797257%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20We%20are%20using%20Log%20analytics%20and%20Kusto%20queries%20to%20analyse%20the%20data.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOur%20scenario%20is%2C%20one%20service%20is%20exporting%20the%20logs%20to%20the%20application%20insights%20and%20other%20service%20(consumer)%20should%20be%20able%20to%20connect%20to%20the%20application%20insights%20and%20run%20the%20Kusto%20queries%20and%20fetch%20the%20data.%3C%2FP%3E%0A%3CP%3EThe%20question%20i%20have%20is%2C%20How%20connect%20the%20consumer%20service%20to%20connect%20the%20Kusto%20logs%20and%20run%20queries.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-797257%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApplication%20Insights%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-798962%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20access%20kusto%20logs%20from%20a%20different%20service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-798962%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20have%20many%20options%20to%20integrate%20the%20Log%20data%20into%20other%20systems%3A%3C%2FP%3E%0A%3CP%3E1.%20You%20can%20use%20the%20Azure%20Monitor%20Logs%20in%20Logic%20Apps%20to%20build%20workflows%3C%2FP%3E%0A%3CP%3E2.%20You%20can%20use%20PowerShell%20to%20write%20scripts%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Faz.operationalinsights%2Finvoke-azoperationalinsightsquery%26nbsp%3B%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Faz.operationalinsights%2Finvoke-azoperationalinsightsquery%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E3.%20You%20can%20use%20any%20REST%20client%20as%20explained%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fdev.loganalytics.io%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdev.loganalytics.io%2F%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%3C%2FP%3E%0A%3CP%3EMeir%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-799487%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20access%20kusto%20logs%20from%20a%20different%20service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-799487%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F84435%22%20target%3D%22_blank%22%3E%40Meir%20Mendelovich%3C%2FA%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200cm%3B%20margin-bottom%3A%20.0001pt%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'inherit'%2Cserif%3B%20color%3A%20%23333333%3B%22%3EThanks%20for%20the%20response.%20What%20I%20would%20like%20to%20do%20is%2C%20run%20Logs%20(Analytics)%20Kusto%20queries%20in%20Application%20Insights%20from%20different%20service%20remotely.%20The%20details%20you%20provided%20was%20for%20Operational%20insights.%20I%20just%20realised%20that%20both%20are%20different.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200cm%3B%20margin-bottom%3A%20.0001pt%3B%20box-sizing%3A%20border-box%3B%20orphans%3A%202%3B%20-webkit-text-stroke-width%3A%200px%3B%20word-spacing%3A%200px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'inherit'%2Cserif%3B%20color%3A%20%23333333%3B%22%3ECan%20you%20please%20let%20me%20know%20if%20there%20is%20a%20way%20to%20run%20Log%20Analytics%20Kusto%20queries%26nbsp%3B%20from%20remote%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200cm%3B%20margin-bottom%3A%20.0001pt%3B%20box-sizing%3A%20border-box%3B%20orphans%3A%202%3B%20-webkit-text-stroke-width%3A%200px%3B%20word-spacing%3A%200px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'inherit'%2Cserif%3B%20color%3A%20%23333333%3B%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200cm%3B%20margin-bottom%3A%20.0001pt%3B%20box-sizing%3A%20border-box%3B%20orphans%3A%202%3B%20-webkit-text-stroke-width%3A%200px%3B%20word-spacing%3A%200px%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2012.0pt%3B%20font-family%3A%20'inherit'%2Cserif%3B%20color%3A%20%23333333%3B%22%3EPlease%20find%20the%20attached%20screenshot.%20I%20would%20like%20to%20run%20a%20query%20which%20is%20shown%20in%20the%20screenshot%20from%20remote%20service.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-799515%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20access%20kusto%20logs%20from%20a%20different%20service%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-799515%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3E%3CBR%20%2F%3EApplication%20Insights%20are%20very%20similar%20to%20Log%20Analytics.%20Here%20is%20the%20API%20documentation%3A%20%3CA%20href%3D%22https%3A%2F%2Fdev.applicationinsights.io%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdev.applicationinsights.io%2F%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%2C%3CBR%20%2F%3EMeir%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
vasudevarao
Microsoft

Hi, 

    We are using Log analytics and Kusto queries to analyse the data. 

Our scenario is, one service is exporting the logs to the application insights and other service (consumer) should be able to connect to the application insights and run the Kusto queries and fetch the data.

The question i have is, How connect the consumer service to connect the Kusto logs and run queries.

 

Thanks. 

3 Replies

Hi,

 

You have many options to integrate the Log data into other systems:

1. You can use the Azure Monitor Logs in Logic Apps to build workflows

2. You can use PowerShell to write scripts: https://docs.microsoft.com/en-us/powershell/module/az.operationalinsights/invoke-azoperationalinsigh...

3. You can use any REST client as explained here: https://dev.loganalytics.io/

 

Thanks

Meir

@Meir Mendelovich

Thanks for the response. What I would like to do is, run Logs (Analytics) Kusto queries in Application Insights from different service remotely. The details you provided was for Operational insights. I just realised that both are different.

Can you please let me know if there is a way to run Log Analytics Kusto queries  from remote

 

Please find the attached screenshot. I would like to run a query which is shown in the screenshot from remote service. 

Hi,

Application Insights are very similar to Log Analytics. Here is the API documentation: https://dev.applicationinsights.io/

Thanks,
Meir