@Oliver Gotz Thanks for reaching out. I have tried to reproduce your issue with sample data generated in event hub. Here are steps I have followed as well as modifications done to make sure data is inserted into logic app.
- Created EventHub, Logic App and Log analytic workspace. Within log analytics workspace , created a custom log by uploading sample.txt.
- I have created below code for retrieving the data from event hub and send it to log analytics workspace.
{ "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "actions": { "Compose": { "inputs": "@triggerBody()?['ContentData']", "runAfter": {}, "type": "Compose" }, "Send_Data": { "inputs": { "body": "@{json(outputs('Compose'))}", "headers": { "Log-Type": "EventHubData_CL" }, "host": { "connection": { "name": "@parameters('$connections')['azureloganalyticsdatacollector']['connectionId']" } }, "method": "post", "path": "/api/logs" }, "runAfter": { "Compose": [ "Succeeded" ] }, "type": "ApiConnection" } }, "contentVersion": "1.0.0.0", "outputs": {}, "parameters": { "$connections": { "defaultValue": {}, "type": "Object" } }, "triggers": { "When_events_are_available_in_Event_Hub": { "evaluatedRecurrence": { "frequency": "Second", "interval": 3, "timeZone": "India Standard Time" }, "inputs": { "host": { "connection": { "name": "@parameters('$connections')['eventhubs']['connectionId']" } }, "method": "get", "path": "/@{encodeURIComponent('test')}/events/batch/head", "queries": { "consumerGroupName": "$Default", "contentType": "application/json" } }, "recurrence": { "frequency": "Second", "interval": 3, "timeZone": "India Standard Time" }, "splitOn": "@triggerBody()", "type": "ApiConnection" } } }, "parameters": { "$connections": { "value": { "azureloganalyticsdatacollector": { "connectionId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg/providers/Microsoft.Web/connections/azureloganalyticsdatacollector", "connectionName": "azureloganalyticsdatacollector", "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Web/locations/eastus/managedApis/azureloganalyticsdatacollector" }, "eventhubs": { "connectionId": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg/providers/Microsoft.Web/connections/eventhubs", "connectionName": "eventhubs", "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Web/locations/eastus/managedApis/eventhubs" } } } } }
When I sent the data directly from event hub , in the first attempt, the data wasn't inserted. Upon checking, the input value isn't converted to json. I would suggest you check and convert your data to json by using json() builtin function.