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

AR Javanmardi 21 Reputation points
2023-01-05T17:25:00.327+00:00

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:
276549-image.png

Then when I click "confirm" at the bottom right corner, a log table like this is shown:
276550-image.png

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

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,459 questions
0 comments No comments
{count} votes

Accepted answer
  1. MartinJaffer-MSFT 26,011 Reputation points
    2023-01-06T18:45:25.21+00:00

    Hello @Anonymous ,
    Thanks for the question and using MS Q&A platform.

    As I understand, you 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.

    276919-image.png
    Click on Diagnostics

    Then click "View Logs". 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"  
    

    Please do let me if you have any queries.

    Thanks
    Martin


    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
      • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful