Created 10-01-2018 08:25 AM
Hello, I need create warnings and alerts. I will recive "a.txt" and "b.txt" files in a input folder, it's possible create a warning if the files are not received before 10 o'clock and create a alert if are not received before 12 o'clock?
thanks!!
Created on 10-01-2018 01:28 PM - edited 08-17-2019 11:24 PM
Use MonitorActivity processor for this case and Configure the processor as Cron Driven to run at 10:00AM,10:01AM
Processor configs:
CronDriven
* 0,1 10 1/1 * ? *
Threshold Duration
1 min //consider how much time elapse before considering the flow is inactive
Continually Send Messages
false
Inactivity Message
Lacking activity as of time: ${now():format('yyyy/MM/dd HH:mm:ss')}; flow has been inactive for ${inactivityDurationMillis:toNumber():divide(60000)} minutes //change this message as per your requirements
Activity Restored Message
Activity restored at time: ${now():format('yyyy/MM/dd HH:mm:ss')} after being inactive for ${inactivityDurationMillis:toNumber():divide(60000)} minutes
Copy Attributes
false //include all the flowfile attributes in the content of flowfile
Monitoring Scope
cluster //determine activeness of flow
Reporting Node
primary //specify which node to send mail
in this way we are running Monitor Activity processor at 10:00AM,10:01AM,
at 10:00AM processor runs every second and check is there any flowfile.
at 10:01AM is to sent out mail for inactivity.
In the same way use another monitorActivity processor to run at 12 to send alert mail.
Flow:
Use inactivity relationship to send out the alert email and Configure PutEmail processor.
-
If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.
Created on 10-01-2018 01:28 PM - edited 08-17-2019 11:24 PM
Use MonitorActivity processor for this case and Configure the processor as Cron Driven to run at 10:00AM,10:01AM
Processor configs:
CronDriven
* 0,1 10 1/1 * ? *
Threshold Duration
1 min //consider how much time elapse before considering the flow is inactive
Continually Send Messages
false
Inactivity Message
Lacking activity as of time: ${now():format('yyyy/MM/dd HH:mm:ss')}; flow has been inactive for ${inactivityDurationMillis:toNumber():divide(60000)} minutes //change this message as per your requirements
Activity Restored Message
Activity restored at time: ${now():format('yyyy/MM/dd HH:mm:ss')} after being inactive for ${inactivityDurationMillis:toNumber():divide(60000)} minutes
Copy Attributes
false //include all the flowfile attributes in the content of flowfile
Monitoring Scope
cluster //determine activeness of flow
Reporting Node
primary //specify which node to send mail
in this way we are running Monitor Activity processor at 10:00AM,10:01AM,
at 10:00AM processor runs every second and check is there any flowfile.
at 10:01AM is to sent out mail for inactivity.
In the same way use another monitorActivity processor to run at 12 to send alert mail.
Flow:
Use inactivity relationship to send out the alert email and Configure PutEmail processor.
-
If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.
Created 10-02-2018 01:10 PM
Use MergeContent and RouteOnAttribute processors before MonitorActivity Processor.
Configure MergeContent processor
Minimum Number of Entries
5
So now processor will wait for 5 flowfiles and only if there are 5 flowfiles then processor merges all the flowfiles into 1 and transfer the flowfile to merged relationship.
Use Max Bin Age property as a wildcard to force the bin to be merged, if we won't configure this property then processor will wait infinite time until it reaches 5 flowfiles.
Then use the Merged Relationship from MergeContent processor to RouteOnAttribute processor
RouteOnAttribute Configurations:
MergeContent processor adds merge.count attribute to the flowfile so use that attribute to check if the value is 5 then give this relationship to MonitorActivity(run this processor at 12:00) processor.
Add new property in RouteOnAttribute processor
${merge.count:equals(5)}
Flow:
1.other processors
2.MergeContent -->use merged relation
3.RouteOnAttribute -->use new property relation
4.MonitorActivity 5.PutEmail
in case if you want sequential merging then refer to this link for flow and configurations.
Created 10-02-2018 08:11 AM