Created 02-21-2017 07:16 AM
I am running Apache NiFI. My use case is to monitor the file transfer process (GetFile to PutHDFS) and send an email whenever their is an error.
Created 02-21-2017 08:27 AM
Hi,
the PutEmail Processor supports the NIFI expression language for the parameter Subject.
That means you can access all the attributes of your flow file and all your custom attributes or variables that you defined within the flow.
To have a custom subject in your PutEmail processor for the error-handling case, you should connect the PutHDFS (or GetFile or both) processor to the PutEmail Processor for the failure path and configure the PutEmail processor.
An example for a custom Subject could be:
'Hello from '${hostname}' the file '${filename}' caused an error at '${now}
More Examples and some guidelines for the Nifi Expression Language are listed here:
https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html
Created 02-21-2017 08:27 AM
Hi,
the PutEmail Processor supports the NIFI expression language for the parameter Subject.
That means you can access all the attributes of your flow file and all your custom attributes or variables that you defined within the flow.
To have a custom subject in your PutEmail processor for the error-handling case, you should connect the PutHDFS (or GetFile or both) processor to the PutEmail Processor for the failure path and configure the PutEmail processor.
An example for a custom Subject could be:
'Hello from '${hostname}' the file '${filename}' caused an error at '${now}
More Examples and some guidelines for the Nifi Expression Language are listed here:
https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html
Created 02-21-2017 10:32 AM
Thanks for your reponse, it helped.
Created 02-21-2017 10:34 AM
Glad that it helped. Could you please klick to accept the above answer, so that others see that this is the solution. Thanks! 🙂
Created 02-21-2017 12:38 PM
Hi Peter,
I already did that. Am I still missing something?