RunBook and Log Analytics

Copper Contributor

I Have a query to run against Log Analytics . This query I need to run Via RunBook. SO please suggest how to run a query in Log Analytics using RunBook.

 

Next question is the results fetched from above query need to be exported into Blob. How can we export requery from Log Analytics into Blob.

2 Replies

You should be able to run queries via PowerShell using the REST API. See  https://dev.loganalytics.io/documentation/Tools/PowerShell-Cmdlets

or the following blog from tao yan

https://blog.tyang.org/2017/11/14/searching-oms-using-the-new-search-language-kusto-rest-api-in-powe...

 

Regarding the export, wouldn't it be a option to create an alert that launches a runbook so you can use powershell / scripting again to write the data back to the blob?