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

Filebeat - Error in load states when enable the recursive glob #4182

Closed
Kirax00 opened this issue May 3, 2017 · 1 comment · Fixed by #4269
Closed

Filebeat - Error in load states when enable the recursive glob #4182

Kirax00 opened this issue May 3, 2017 · 1 comment · Fixed by #4269
Labels

Comments

@Kirax00
Copy link

Kirax00 commented May 3, 2017

Please help to check the problem.
Version: master
Operating System: SUSE11
Steps to Reproduce:

  1. enable the recursive glob.
  2. use ** in the path as /home/cmp/**/*.log
  3. start the main_test, and it will collect the log
  4. restart the filebeat, when it load the exist states, it will drop the actually marched source.
		match, err = filepath.Match(glob, filePath)
		if err != nil {
			logp.Debug("prospector", "Error matching glob: %s", err)
			continue
		}

The glob is /home/cmp/**/*.log, if the filePath is /home/cmp/a/b/c.log, the match will be false. Then the source will be dropped, which is an unexpected behavior.
Then the filebeat will collect the log from beginning, which is duplicately.

@ruflin ruflin added bug Filebeat Filebeat labels May 9, 2017
@ruflin
Copy link
Member

ruflin commented May 9, 2017

@Kirax00 Thanks for the report. This is definitively a bug. On startup the prospector compares the pattern to the prospector config and in the comparison part we use the old matching as you pointed out above.

@7AC Can you look into this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants