Support Questions
Find answers, ask questions, and share your expertise

Raise alert from NiFi if file not available from GetSFTP processor

Solved Go to solution
Highlighted

Raise alert from NiFi if file not available from GetSFTP processor

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

Accepted Solutions

Re: Raise alert from NiFi if file not available from GetSFTP processor

2 REPLIES 2
Highlighted

Re: Raise alert from NiFi if file not available from GetSFTP processor

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.

Re: Raise alert from NiFi if file not available from GetSFTP processor