I have the following GuestConfiguration with several compliance status':
I want to be able to view these records in the log analytics workspace or something similar and eventually, output the results as a CSV for auditing.
I tried to use the policy assignment. However, this only gives me the overall "is the VM compliant": YES/NO. I'm trying to keep the compliance granularity per VM.
I want to be able to view these records in the log analytics workspace or something similar and eventually, output the results as a CSV for auditing.
As there is no feature in Log Analytics
to export query results to Excel, you can achieve the same scenario by using a Logic App
.
Here is the steps to send Log Analytics query result to CSV using Logic Apps.
KQL query
in Log Analytics
Logic App
3.After running the Logic App
flow, the CSV
file generated by the KQL query
has been uploaded to the Storage account
as shown below.
CSV File
Reference: Connect to Log Analytics or Application Insights from workflows in Azure Logic Apps