Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

How to search a directory for files and send an email notification if no files are present using NiFi?

avatar
New Member
 
1 ACCEPTED SOLUTION

avatar
Master Mentor

@NAVEEN KUMAR

One suggestion might be use a ListFile processor configured to run on cron schedule. You could then feed the success from that processor to MonitorActivity processor. The inactive relationship of this processor could be routed to a putEmail processor.

So lets say you have you list file configured to run every 3 minutes based on a cron. You could set your threshold in the MonitorActivity processor to 3 minutes with a setting of "continually send message" set to true. With the inactive relationship routed to putEmail, you will get an email every 3 minutes if the listFile produced no new files.

you could also route the activity.restored relationship to a PutEmail processor if you want to be notified if file where seen following a period of no activity.

10329-screen-shot-2016-12-15-at-82756-am.png

Thanks,

Matt

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@NAVEEN KUMAR

One suggestion might be use a ListFile processor configured to run on cron schedule. You could then feed the success from that processor to MonitorActivity processor. The inactive relationship of this processor could be routed to a putEmail processor.

So lets say you have you list file configured to run every 3 minutes based on a cron. You could set your threshold in the MonitorActivity processor to 3 minutes with a setting of "continually send message" set to true. With the inactive relationship routed to putEmail, you will get an email every 3 minutes if the listFile produced no new files.

you could also route the activity.restored relationship to a PutEmail processor if you want to be notified if file where seen following a period of no activity.

10329-screen-shot-2016-12-15-at-82756-am.png

Thanks,

Matt

avatar
New Member

Thanks very much @Matt. It works!!!