Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Tailfile with rotate log files

Solved Go to solution

Re: Tailfile with rotate log files

Not sure to understand.

If you do the following test:

cat ‘record01’ >> /home/wls.log

The NiFi Flow Data Provenance is OK. The line ‘record01’ appears.

mv /home/wls.log /home/wls.log.01

cat ‘record02’ >> /home/wls.log

I believe the parameters should be the following:

File to Tail /home/wls.log

Rolling Filename Pattern : wls.log.01

Is that what you did?

The observation you made are valid because the processor keeps in its state the position of the last read bytes in the tailed file. This is why if the roll over is not detected by the processor, it won't pick up new data or it will but partially (from the last known position).

Re: Tailfile with rotate log files

No it's not what I did. I'm going to test again with Rolling Filename Pattern : wls.log.*.


Re: Tailfile with rotate log files

@Pierre Villard

Results are the same even with the new pattern "wls.log.*" and also with all the value of "initial start position".

I think there's a problem.

All I want is to receive (tail) the new records that are written in the wls.log file. And also when the log file rotates and keeps the same name "wls.log".

This case seems very simple yet. But I can't achieve it with Nifi.

So I think there's a little bug. Don't you think the same ?

Please let me know


Don't have an account?
Coming from Hortonworks? Activate your account here