Support Questions

Find answers, ask questions, and share your expertise

Monitor Activity Processor Not generating any flow file

avatar

Hello Guys,

I have used Query Databases processor for extracting delta record from table but in cases if delta is not there Querydatabases processor will not generate flow file and my down stream job depends on flow file .So i have used monitor activity and designed a flow and when was the first run its working fine in cases of Zero delta record and it has generated flow file but now in day 2 same situation happened and in table there was not delta record and now monitor activity processor is not generating flow file.

Can any one suggest me what can be a problem?

Query data bases processor i have given a CRON Driven at 9 am UTC and Monitor Activity at 10 am UTC with Thresold Value 5 min.

Regards,

Shantanu

flow-nifi.png flow-nifi-2.png

flow-nifi.pngflow-nifi-2.png
1 ACCEPTED SOLUTION

avatar
Master Guru

@Shantanu kumar

You have to run Monitor Activity processor until 10:05am UTC because threshold value is set to 5 min, if you run monitor activity processor at 10 am then processor run at 10:00am only not at 10:01am, so there is no window has been created for 5 min for monitor activity processor to know is there any flow files for last 5 min (or) not.

Change the schedule of Monitor Activity processor to 0 0-5 10 1/1 * ? *

now processor runs at 10:00 am,10:01am,10:02am,10:03am,10:04am after 10:04am processor has been ran for 5 mins,now at

10:05am run processor sends an inactivity flow file and triggers your ExecuteSql Processor.

View solution in original post

13 REPLIES 13

avatar
Master Guru

@Shantanu kumar

Strange,I have tried with your configs i.e running on primary node,Monitoring Scope cluster Reporting primary with Cron Driven as scheduling strategy and i got inactivity flow file if the flow has been inactive for 1 minute.

How ever i would suggest to run monitor activity processor on all nodes here is the scenario you are having nifi cluster of 2 nodes and querydatabasetable (QDT) runs on primary node(1 node) once QDT fetches all the delta records then the primary node got changed to 2 node while your Monitor activity processor running on primary node(i.e 2 node now).

At this time the QDT processor output flowfile is in 1 node at this time monitor activity processor doesn't process because it is running on 2 node now and the flowfile will be waiting in the queue before Monitor activity processor until when the 1 node will be primary node again.

if Continually Send Messages is set to true:-

if we keep this property to true also we don't get messages continuesly because we are running processor at specific time so we will get only 1 message at 10:01 am.
If you have scheduled the processor to run at 0 sec then threshold duration at 1 min then at every minute processor sends a message until the activity got restored.

if Copy Attributes is set to True:-

If we keep this property to True i.e will copy all flow file attributes from the flow file that resumed activity to the newly created indicator flow file. As we are auto terminating restored and success relationships we don't have to keep this property value to true.

avatar

Hello @Shu I am facing some issue with Monitor activity . If you do not mind can you help me on it.

76559-nifi-monitor-propertires.png

76560-nifi-monitor-schedule.png

In above screen shot you can see the setting for Monitor activity with this setting my jobs are running in productions everyday but problem occurred when Querydatabase table processor triggered in different instance and monitor activity processor triggered on different instance and in this case since data is there so at 9 am Querydatabase table processor produce one flow file and its loaded to table and now at 10 Am monitor activity also gets executed and its generate one flow file and again my table got loaded with 0 count data .Can we restrict both processor can run on same instance or any other solution you have for this issue.

Regards,

Shantanu.

avatar
Master Guru
@Shantanu kumar

I think the issue is with the scheduling of Monitor Activity processor as the processor scheduled to run at 10:00 AM everyday and the Threshhold duration is 1 min.

Change the schedule to run at 10:00AM and 10:01 AM also because processor will look for any flowfile will be feeded at 10:00AM,if there is no flowfile feeded to the processor then at 10:01 AM processor will trigger any inactivity flowfile.

if you run processor at 10:00AM only then there will be no inactivity flowfile triggered.

Change the scheduling cron expression to below expression

0 0-1 10 * * ?

avatar

Hello @Shu .I think you are giving me a reply based on subject line but now problem is as below.

In above screen shot you can see the setting for Monitor activity with this setting my jobs are running in productions everyday but problem occurred when Querydatabase table processor triggered in different instance and monitor activity processor triggered on different instance and in this case since data is there so at 9 am Querydatabase table processor produce one flow file and its loaded to table and now at 10 Am monitor activity also gets executed and its generate one flow file and again my table got loaded with 0 count data .Can we restrict both processor can run on same instance or any other solution you have for this issue.

Monitor activity is generating flow file in both case when querydatabses table processor is generatng flow file in cases of delta data and if querydatabses table processor is not generatngflow file in cases of delta data. We need flow file in case of when querydatabses table processor is not generatngflow file .

Regards,

Shantanu