Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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?



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.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.