Reputation: 3010
I have a published and scheduled pipeline running at regular intervals. Some times, the pipeline may fail (for example if the datastore is offline for maintenance). Is there a way to specify the scheduled pipeline to perform a certain action if the pipeline fails for any reason? Actions could be to send me an email, try to run again in a few hours later or invoke a webhook. As it is now, I have to manually check the status of our production pipeline at regular intervals, and this is sub-optimal for obvious reasons. I could of course instruct every script in my pipeline to perform certain actions if they fail for whatever reason, but it would be cleaner and easier to specify it globally for the pipeline schedule (or the pipeline itself).
Possible sub-optimal solutions could be:
All the solutions above suffers from being convoluted and not very clean - surely there must exist a simple, clean solution for this problem?
Upvotes: 1
Views: 770
Reputation: 306
This solution reads from the logs of your pipeline and let's you do something within a Logic App capability, I used it to email the team when a scheduled pipeline failed.
Steps:
Two fundamental steps while creating the Event subscription:
It looks like a lot of setup but it's super easy and quick to do, it would look something like this in the end:
Upvotes: 2