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.

Raise alert from NiFi if file not available from GetSFTP processor

avatar
New Member

I have a GetSFTP processor which is scanning for new files on a remote sftp server. A file is expected to arrive once a day. Is there a way with NiFi to raise an alert if a file is not received from the sftp site on a day?

1 ACCEPTED SOLUTION
2 REPLIES 2

avatar
Guru

You can do the following:

1. Schedule FetchSFTP processor for once a day arrival of file

2a. fork 'success' relationship to flow to process file when it arrives

2b fork 'not.found' relationship to PutEmail, where you configure recipients, email message (body), etc

You will have to use one FetchSFTP processor for each file that you expect to arrive in sftp location and you will have to know the name of the file. You can reuse the PutEmail (by pointing multiple FetchSFTP not.found to same PutEmail) and have same recipients and email body but with filename dynamically written in body using expression language. Alternatively, you can have each not.found connection connect to its own PutEmail.

avatar