Grab data/information from anywhere and store this in Log Analytics. Basically any log, any OS, any type of data can be captured on a loop and sent to a Log Analytics workspace on a constant basis, then can be used to pull out reports etc.
My example below pulls the ‘Current Playing Song‘ out of radio station websites, it runs through many radio stations, at the end converts the aggravated results to JSON, then the data is sent to the Custom Log in Log Analytics using the API.
You can run the script below on a regular basis, e.g. set this up as a scheduled task.
To set things up and to get underway, there’s a few variables to set at the top of the script.
Both the $CustomerID and $SharedKey can be found from the Advanced Settings area of your Log Analytics workspace in the Azure Portal as shown below….
The $LogType is the name of your custom log file, you don’t need to create this prior to tunning the script, the Custom Log will be created the very first time you run the script under the name you give it here.