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

Files on NFS volume vs sincedb #45

Open
benoiton opened this issue May 18, 2015 · 7 comments
Open

Files on NFS volume vs sincedb #45

benoiton opened this issue May 18, 2015 · 7 comments

Comments

@benoiton
Copy link

My logs are on a NFS volume. They are correctly parsed. After reboot, they are parsed again.

The reason is the sincedb format. This file identifies processed file with their major+minor+inode. minor is not the same each time the same NFS volume is mounted on the same NFS client. Therefore, the old files are seen as new files after reboot.

Why not identify processed files with full path ?

@wiibaa
Copy link
Contributor

wiibaa commented May 18, 2015

This is indeed necessary also when using rsync as mentionned in pending PR jordansissel/ruby-filewatch#34

@jordansissel
Copy link
Contributor

I haven't confirmed if this is still a bug, but I agree about the problem. Logstash should somehow detect that the file being watched is on a remote filesystem or allow users to explicitly follow files by path name (not implicit inode tracking).

@splashx
Copy link

splashx commented Sep 12, 2015

I can confirm this is still an issue - I was bulk importing from a NFS and after rebooting / remount files which were already processed were being again processed - I use a fixed sincedb file and noticed the minor value changed from 24 to 25.

@splashx
Copy link

splashx commented Nov 2, 2015

I think we can close this - read more.

@guyboertje
Copy link
Contributor

Except, we have not done the fingerprinting bit yet.

@lucabelluccini
Copy link

@zhenchuan
Copy link

I wrote a ruby ​​script to help me deal with this problem

this script wil modify inode info( which may changes after re_mount ) in sincedb file when using logstash's logstash-input-file plugin on nfs.
https://gist.github.com/zhenchuan/10bd5eafb6c4058a83c17e053278d889

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

7 participants