Log Analytics data migration for Event Hubs

Grzegorek Mariusz 21 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.
1,825 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Swathi Dhanwada 9,386 Reputation points Microsoft Employee
    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