How to create email notification alerts for Data Factory using devops pipelines?

mateuszwolowicz 21 Reputation points
2022-02-16T13:25:25.083+00:00

Hi,

I have a strong need to create alerts&metrics for my ADF instance, mainly for failed runs. I wnat it to email me when pipeline run fails.

Whilst it's easy and obvious how to implement it manually, it's a bit complicated when I want to do it via azure devops release pipelines.

The point is, I have no permissions access to update the mentioned instance - The only way I can update it are devops pipelines.

I was looking for some devops tasks to work on it but I could not find any. Also I thought about some python/powershell script to make it programatically (triggered via devops).

I will appreciate any help & hints how to approach this.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,266 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,693 questions
{count} votes

Accepted answer
  1. AnnuKumari-MSFT 32,906 Reputation points Microsoft Employee
    2022-02-28T15:08:16.397+00:00

    Hi @mateuszwolowicz ,

    Thankyou for using Microsoft Q&A platform and posting your query.

    As I understand your query, you want to send email notification in case of ADF pipeline failure. For this, you want to use Azure DevOps pipelines and write PowerShell scripts to achieve the requirement. Please correct me if my understanding is wrong.

    The challenge with this approach is that Azure DevOps release pipeline gets triggered

    1. either manually when you create a new release
    2. or automatically if you use build artifact , whenever any changes are made in ARM template and that is published. But it doesn't get triggered as soon as any activity fails in ADF pipelines.

    Still if you want to use Azure DevOps for this purpose, you can create powershell script and call a powershell task in the Azure DevOps release pipeline. You can find Reference of the powershell script in the following video : https://www.youtube.com/watch?v=IpM08xl-NHk&t=238s

    More logical way to handle this requirement and to send custom email notification in case of ADF pipeline failure is to use Azure Logic Apps where you get the ability to send email notification as soon as an activity fails or succeeds .

    Please refer to the following videos for implementation of the same :
    https://www.youtube.com/watch?v=zyqf8e-6u4w&t=568s
    https://www.youtube.com/watch?v=4Hcvn9TQ5fM

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • 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

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.