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.newTriggers does not know about the file being rotated #78

Open
leehinman opened this issue Aug 25, 2022 · 0 comments
Open

file.newTriggers does not know about the file being rotated #78

leehinman opened this issue Aug 25, 2022 · 0 comments
Labels
8.6-candidate bug Something isn't working Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Comments

@leehinman
Copy link
Contributor

The file.newTriggers function doesn't take the filename (or it's properties) as an argument. This means that when an intervalTrigger is created, there is no way to populate the lastRotate field in the trigger with the creation time of the file. This results in the lastRotate field being the zero value for a duration. When the trigger is first executed it will always report that the file needs to be rotated because difference between the zero value and now() will be greater than the interval. This leads to unexpected behavior if rotateonstartup: false is set.

Fixes need to be backported to beats repo that have this package internally.

@jlind23 jlind23 added bug Something isn't working 8.6-candidate Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.6-candidate bug Something isn't working Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

No branches or pull requests

2 participants