In this video I go over writing data directly to Log Analytics with the HTTP Data Collector API using PowerShell. The goal was to create a universal way to write any data to log analytics. I did this by creating a function that takes the date, the log Type and a hashtable of key and data pairs and writes it to a Log Analytics workspace.
The function can be added to a script and used to send data directly to Log Analytics. I use it in a Module added to Azure Automation. From there I can write data to Log Analytics from any Azure Automation Runbooks. Once in Log Analytics, I can trigger alerts or tie into Logic Apps to kick off other Run Books, alerts or webhooks to other systems.
Additional data can be found here:
http://www.ciraltos.com/azure-oms-log...
https://docs.microsoft.com/en-us/azur...
https://docs.microsoft.com/en-us/azur...
The function can be found here:
https://github.com/tsrob50/LogAnalyti...