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 store failure as logs in a particular directory or mail with in Nifi?

avatar
Rising Star

I have flow like get files from FTP to HDFS.

1.In Each process i need to store failure as log and store in a particular location

2.In Each process i need to store failure as log and mail to admin(mail id)

Thanks In Advance

1 ACCEPTED SOLUTION

avatar
Master Mentor

There are a few things you can do here if i am understanding correctly what you are trying to accomplish.

1. The logback.xml can be modified so specific processor component logs could be redirected to a specific new log file. You can specify where that new log is written. You could also specify the specific log level of those components (WARN level would get you just WARN and ERROR messages). 2. In your dataflow you could use the TailFile processor to monitor that new log and route any generated FlowFiles to a putEmail processor to send them to your Admin. In addition to email you can route those FlowFiles to a processor of your choice to put a copy to a specific location as well either locally or remotely.

Thanks,

Matt

View solution in original post

1 REPLY 1

avatar
Master Mentor

There are a few things you can do here if i am understanding correctly what you are trying to accomplish.

1. The logback.xml can be modified so specific processor component logs could be redirected to a specific new log file. You can specify where that new log is written. You could also specify the specific log level of those components (WARN level would get you just WARN and ERROR messages). 2. In your dataflow you could use the TailFile processor to monitor that new log and route any generated FlowFiles to a putEmail processor to send them to your Admin. In addition to email you can route those FlowFiles to a processor of your choice to put a copy to a specific location as well either locally or remotely.

Thanks,

Matt