Created 03-27-2017 05:29 PM
Team,
I am new to Nifi Application. Can anyone please let me know how to notify user if there is any failure/error in Nifi Processors. I know error message is captured in Bulletin Board. Is it possible to send email to user if there is any error in bulletin board? Any help is much appreciated.
Thanks
Gowthaman
Created 03-27-2017 05:42 PM
The NiFi master bulletin board does not constantly run in the background, Its simply shows a continuous stream of bulletins being produced by processor components on the canvas while it is open. The bulletins are nothing more then snippets of the WARN or ERROR log lines that are being written to the nifi-app.log.
The processors that are actually producing bulletins often have a a failure relationship where such FlowFiles will be routed upon failure. This is where you want to handle your notifications. Perhaps setting up a failure loop that will attempt to processes the FlowFile x number of times before kicking it out of the loop. If a file gets kicked out of the loop, you could use and putEmail processor to notify you of the failure.
See below for template of such a failure loop:
For processor components where there is no failure relationship, you could use a MonitorActivity processor in your dataflow. This processor can be configured with a threshold and if a FlowFile has not passed within that threshold, a FlowFile is generated that can also be send to a PutEmail processor for alerting purposes. It also will Generate a FlowFile when activity has been restored.
Thanks,
Matt
Created 03-27-2017 05:42 PM
The NiFi master bulletin board does not constantly run in the background, Its simply shows a continuous stream of bulletins being produced by processor components on the canvas while it is open. The bulletins are nothing more then snippets of the WARN or ERROR log lines that are being written to the nifi-app.log.
The processors that are actually producing bulletins often have a a failure relationship where such FlowFiles will be routed upon failure. This is where you want to handle your notifications. Perhaps setting up a failure loop that will attempt to processes the FlowFile x number of times before kicking it out of the loop. If a file gets kicked out of the loop, you could use and putEmail processor to notify you of the failure.
See below for template of such a failure loop:
For processor components where there is no failure relationship, you could use a MonitorActivity processor in your dataflow. This processor can be configured with a threshold and if a FlowFile has not passed within that threshold, a FlowFile is generated that can also be send to a PutEmail processor for alerting purposes. It also will Generate a FlowFile when activity has been restored.
Thanks,
Matt
Created 03-27-2017 07:27 PM
You can also retrieve bulletins via a call to NiFi's rest-api:
curl 'http://<hostname>:<port>/nifi-api/flow/bulletin-board'