- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Created on 01-31-2017 06:37 PM - edited 08-17-2019 05:17 AM
Introduction
When the NiFi bootstrap starts or stops NiFi, or detects that it has died unexpectedly, it is able to notify configured recipients. Currently, the only mechanism supplied is to send an e-mail notification.
Prerequisite
1) Assuming you already have HDF-2.x Installed, Ambari and NiFi is up and running. If not, I would recommend "Ease of Deployment" section of this article to install it [You can also follow this article for Automated installation of HDF cluster or refer hortonworks.com for detailed steps]
Configuring NiFi property files in Ambari
1) To setup email notifications we have to update only two configurations file bootstrap.conf and bootstrap-notification-services.xml
2) We have to update appropriate properties in Ambari to configure it, first we have to edit Template for bootstrap.conf to update below properties. Uncomment below lines in the properties file:
nifi.start.notification.services=email-notification nifi.stop.notification.services=email-notification nifi.dead.notification.services=email-notification
3) Edit Template for bootstrap-notification-services.xml and make sure your SMTP settings are updated, and are uncommented. Sample configuration is given below:
<service> <id>email-notification</id> <class>org.apache.nifi.bootstrap.notification.email.EmailNotificationService</class> <property name="SMTP Hostname">west.xxxx.server.net</property> <property name="SMTP Port">587</property> <property name="SMTP Username">jgeorge@hortonworks.com</property> <property name="SMTP Password">Th1sisn0tmypassw0rd</property> <property name="SMTP TLS">true</property> <property name="From">jgeorge@hortonworks</property> <property name="To">jgeorge@hortonworks.com</property> </service>
4) Save the Config changes in Ambari after uncommenting the, <service> property, confirm when asked and restart service.
Testing NiFi Notification Services
1) Once restarted, you will see both stopped and started alerts in your inbox with details.
Stopped Email Alert:
Started Email Alert:
2) Try out stopping and killing NiFi process [make sure you don’t kill bootstrap process which monitors NiFi which in turn restarts NiFi process.]
Died Email Alert:
References
Thanks,
Jobin George

Created on 04-27-2018 04:23 PM
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hey Jobin,
After configuring all the setting for Bootstrap notifier I'm not receiving any emails or I'm not receiving any errors. I'm not sure if I'm missing anything. I have checked all the files again, everything looks good but not getting any output. I'm using outlook email address.
Thank you
Created on 09-10-2018 02:12 PM
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I too faced the same issue of not receiving emails,although configuration was set as mentioned in the above article,then i added this property in botstrap-notification.xml and it worked for me. since my smtp didnt require any username and password authentication, i deleted those properties and added this one,
<property name="SMTP Auth">false</property>
(note this needs to be added additionally its not already there in default xml, need to false it as its default value is true (reference:https://github.com/apache/nifi/blob/master/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/notification/email/EmailNotificationService.java)
please vote up if my answer helped.