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][input/filestream] ignore_inactive not work #41560

Open
jxplus opened this issue Nov 8, 2024 · 1 comment
Open

[filebeat][input/filestream] ignore_inactive not work #41560

jxplus opened this issue Nov 8, 2024 · 1 comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label

Comments

@jxplus
Copy link

jxplus commented Nov 8, 2024

Please post all questions and issues on https://discuss.elastic.co/c/beats
before opening a Github Issue. Your questions will reach a wider audience there,
and if we confirm that there is a bug, then you can open a new issue.

For security vulnerabilities please only send reports to [email protected].
See https://www.elastic.co/community/security for more information.

Please include configurations and logs if available.

For confirmed bugs, please report:

  • Version: 8.15.2
  • Operating System: centos 7

as as write frenquency log file, such as nginx access.log, filebeat config:
ignore_inactive: "since_last_start"
is not work.

i see the code:

func (p *fileProspector) isFileIgnored(log *logp.Logger, fe loginp.FSEvent, ignoreInactiveSince time.Time) bool {
	。。。
	if !ignoreInactiveSince.IsZero() && fe.Info.ModTime().Sub(ignoreInactiveSince) <= 0 {
		log.Debugf("Ignore file because ignore_since.* reached time %v. File %s", p.ignoreInactiveSince, fe.NewPath)
		return true
	}
	return false
}

when log file is always writing, and its modTime > sinceTime very possibly.
my suggestion:why not read the file bytes of sinceTime, and directly set to offset.

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 8, 2024
@botelastic
Copy link

botelastic bot commented Nov 8, 2024

This issue doesn't have a Team:<team> label.

@jxplus jxplus changed the title [filebeat] ignore_inactive not work [filebeat][input/filestream] ignore_inactive not work Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

No branches or pull requests

1 participant