0
votes

Im setting up a Azure Event Hub for a third party to use their data for monitoring purposes.

I know some azure services have a direct way via Diagnostic settings to send data to an event hub.

I am trying to work out how if possible, to send AppService logs to the Event Hub.

From what I have read, there is no direct way but it is possible if you use Application insights, export that data to a storage container and from there, use a logicApp to to send data to a event hub via a Trigger and action steps.

I have tried following the information here - https://docs.microsoft.com/en-us/azure/azure-monitor/platform/stream-monitoring-data-event-hubs but details about using LogicApp to send information to event hub everytime I execute the LogicApp Trigger, the action to send the event to the hub returns the error "Event received is null and could not be parsed".

Anyone have any ideas on how to do this.

Cheers

1

1 Answers

0
votes

If you try to use logic app to send application insights data(which is stored in blob storage via continuous export) to event hub, there is a problem.

Since the application insights data in blob storage is stored in such many sub-folders based on date and time(like Event/2019-09-17/05 or Request/2019-09-17/05), but the log app blob trigger would not fire when blob is added in a sub-folder unless you specify the full path. The issue is here. So it's almost impossible even if you define a lot of logic apps and for each one you specify a path, but the path(sub-folder) is changing each time.

And here are 2 ways for workaround:

1.You can use some tools or code or manually to copy the blobs which stores application insights data to another container directly without any sub-folder, then use logic app, it can work as per my test.

2.I suggest you can first write your own code via blob storage sdk, loop each blob of application insights data in blob storage. Then take use of azure event hub client to send these data to event hub.

Hope it helps, and also please let me know if you have any issues in writing the code.