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:
Then when I click "confirm" at the bottom right corner, a log table like this is shown:
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"
This will open the Microsoft Integration Runtime Configuration Manager. You will likely be prompted to allow it to make changes.
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"
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"