Home > database >  Is it possible to export activity logs on self-hosted IR in Azure Data Factory?
Is it possible to export activity logs on self-hosted IR in Azure Data Factory?

Time:01-08

I have a Web Activity module in an Azure Data Factory (ADF) pipeline that calls an API, and it's been running for some time. I want to export the "Activity Log" of all instances of this activity.

I can see the Activity Log for a single instance through monitor tab in ADF. When trying to access the log I see this message first:
enter image description here

Then when I click "confirm" at the bottom right corner, a log table like this is shown:
enter image description here

I was wondering if it's possible to export this log for all instances of execution of this Web Activity module.

CodePudding user response:

I also asked the question in Microsoft forum and got the answer:

We want to export the logs of you Self-Hosted Integration Runtime (SHIR). This is doable. The tricky part is sorting through the logs to find the exact events you want. The Logs are stored on the same machine as your SHIR. Go to that computer and open/run "Microsoft Integration Runtime"

277000-image.png

This will open the Microsoft Integration Runtime Configuration Manager. You will likely be prompted to allow it to make changes.

Click on Diagnostics 276919-image.png

Then click "View Logs". enter image description here

This will open the "Event Viewer" which is part of Windows. The Event Viewer is not part of Azure Data Factory. Event Viewer comes with windows. logs As Event Viewer is part of Microsoft Windows, it can show you things not part of the Integration Runtime. After clicking on "View Logs", and waiting for the Event Viewer to load, it should be showing "Connectors -- Integration Runtime"

Event Viewer

You may want to Filter the log before doing the "Save as".

There is also a way to do this from Powershell.

Get-EventLog -LogName "Integration Runtime" -Source "Integration Runtime (Self-hosted) Host Service" -After (Get-Date).AddMinutes(-15) | Sort-Object Time | Export-CSV "C:/last15minutes_$dataTimeNow.CSV"
  • Related