Route Subscription Activity Log to an EventHub thru Powershell or Azure CLI

%3CLINGO-SUB%20id%3D%22lingo-sub-1040287%22%20slang%3D%22en-US%22%3ERoute%20Subscription%20Activity%20Log%20to%20an%20EventHub%20thru%20Powershell%20or%20Azure%20CLI%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1040287%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fplatform%2Factivity-logs-overview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Fplatform%2Factivity-logs-overview%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20I%20please%20know%20how%20can%20the%20activity%20logs%20from%20a%20subscription%20can%20be%20routed%20via%20code%20to%20an%20event%20hub%3F%3C%2FP%3E%3CP%3EI%20would%20like%20to%20create%20via%20code%20an%26nbsp%3B%20Activity%20Log%20-%26gt%3B%20Export%20to%20Event%20Hub%20-%26gt%3B%20Select%20all%20the%20category%20logs%20(%3CSPAN%3EAdministrative%2C%26nbsp%3BService%20Health%2C%20etc%20)%20-%26gt%3B%20to%20an%20Event%20Hub%26nbsp%3B%20via%20Azure%20CLI%20or%20PowerShell%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1040287%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAutomation%20%26amp%3B%20Control%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzureCLI%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

https://docs.microsoft.com/en-us/azure/azure-monitor/platform/activity-logs-overview

 

Can I please know how can the activity logs from a subscription can be routed via code to an event hub?

I would like to create via code an  Activity Log -> Export to Event Hub -> Select all the category logs (Administrative, Service Health, etc ) -> to an Event Hub  via Azure CLI or PowerShell

0 Replies