How can I export logs from Azure in JSON format? and what is the best practicee to do that?
There is the option to use direct Kusto queries and export the logs to CSV, but in this case there is no JSON object export option.
How can I export logs from Azure in JSON format? and what is the best practicee to do that?
There is the option to use direct Kusto queries and export the logs to CSV, but in this case there is no JSON object export option.
2
Answers
You can use the Diagnostic settings to create a continuous export of selected telemetry to for example a storage account:
The telemetry will be stored a json in blobs when you use a storage account as export destionation. See the docs for more detail regarding the export to blob storage.
I do agree with @Peter Bons, But if you already exported the data as CSV you can follow below powerShell commands to change it into Json Objects:
Firstly taken data and then converted it into json then posted that data into a json file.
Output: