Skip to content

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

@leehinman

Description

@leehinman

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions