Log Analytics data migration for Event Hubs

Grzegorek Mariusz 26 Reputation points
2021-04-19T06:25:57.527+00:00

how to transfer data from Log Analytics to Event Hubs?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,629 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 18,916 Reputation points Moderator
    2021-04-27T08:24:17.76+00:00

    @Grzegorek Mariusz To export data from log analytics to event hubs , you can use below commands. Kindly check if this is what you are looking for

    Create a data export rule to an event hub using CLI. Below command separate event hub is created for each table.

    $eventHubsNamespacesResourceId = '/subscriptions/subscription-id/resourceGroups/resource-group-name/providers/Microsoft.EventHub/namespaces/namespaces-name'  
    az monitor log-analytics workspace data-export create --resource-group resourceGroupName --workspace-name workspaceName --name ruleName --tables SecurityEvent Heartbeat --destination $eventHubsNamespacesResourceId  
    

    Create a data export rule to a specific event hub using CLI. All tables are exported to the provided event hub name.

    $eventHubResourceId = '/subscriptions/subscription-id/resourceGroups/resource-group-name/providers/Microsoft.EventHub/namespaces/namespaces-name/eventhubs/eventhub-name'  
    az monitor log-analytics workspace data-export create --resource-group resourceGroupName --workspace-name workspaceName --name ruleName --tables SecurityEvent Heartbeat --destination $eventHubResourceId  
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.