Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ File input and logs rotation ] #124

Closed
jerome83136 opened this issue Apr 22, 2016 · 1 comment
Closed

[ File input and logs rotation ] #124

jerome83136 opened this issue Apr 22, 2016 · 1 comment

Comments

@jerome83136
Copy link

Hi,
I have launched node-logstash to process my logs yesterday.
My logs have been read and merged in the relevant output files.

These logs are Apache access logs and they are rotated every day at 03:00 am
If the input file rotates, how will node-logstash handle it ? Will the new file (after rotation) been read from the beginning ? How will the .dbfile be managed ?

I have read the documentation and it talks about this:

use_tail: use system tail -f command to monitor file, instead of built in file monitoring. Should be used with logrotate and copytuncate option. Defaut value: false.

So I guess there is a special way to deal with "rotating" input file. But what is the good approach ? Do I have to use "use_tail" or can I achieve the same thing with the built-in file reader ?

Many thanks for your time

Best regards
Jérôme

@bpaquet
Copy link
Owner

bpaquet commented Apr 23, 2016

Hi,

The standard file input (without tail), is, on Linux, compatible with logrotate, copytruncate or standard mode.
I did lot of test on this point (it was the first node-logstash feature), and use it in production.

I have updated the doc to be more precise.

Regards,

Bertrand

@bpaquet bpaquet closed this as completed Apr 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants