Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

Apache Nifi - How to generate Email alerts in a Nifi Cluster

Expert Contributor


I am trying to use PutEmail in my workflow to send email alert whenever something fails. I have 8 slave nodes and my dataflow is running on all slaves (meaning not just primary node)

The issue is that I get multiple emails if one processor has errors etc. I think this is because we have 8 slaves, so PutEmail is running on all 8 slaves and therefore I get multiple emails.

- Is there a way to ensure that we always get 1 Email instead of 8?




Master Guru

I guess it depends what you are trying to achieve. You are right that you would get an email per node in your cluster, but each email would be for the errors on that node only, so its not like you are getting 8 of the same email.

If you really want only 1 email... It would probably be easiest to use something in between as a buffer for all your errors. For example, have a Kafka topic like "errors" and have each node in your cluster publish using PublishKafka. Then have a ConsumeKafka that runs only on primary node, merges together some amount of errors, and sends to a PutEmail (or maybe Merge's together first). Could do the same thing JMS, or a shared filesystem, or anywhere you put the errors and then retrieve from.

View solution in original post


Expert Contributor

Awesome, thanks for the pointers,

Expert Contributor

@Bryan Bende:

I wrote a ReportingTask to retrieve messages from BulletinRepository and report Error/Warn/Info metrics, however the repository would always return at-max 5 messages per component no matter how I use the API 😞 (

Do you think this might be by design?

So would you recommend Nifi REST api or should I look for any other solution (start monitoring actual logs etc)

New Contributor

Hi All, even i too need one simple example how to set mail alerts with business logic when something went wrong in NIFI. if possible share one sample link. I am very new to NIFI, now i need this requirement to my current support project, Thanks in advance.