Vector: Can the file sink support reopen?

Created on 10 Jun 2020  路  4Comments  路  Source: timberio/vector

I want to use logrotate to rotate files created by the file sink. After rotate, I'd like the file sink can reopen file, how to do it?

Or can the file sink support max file size and max file number option? What I want to do is to limit the size and number of the file.

should file bug enhancement help

Most helpful comment

I'm able to reproduce the bug, working on fixing it.

All 4 comments

Thanks @panpan-wu, and sorry for the delay. Vector should reopen the file if it is no longer present. logrotate should rightfully handle file rotation, I do not think Vector should concern itself with this. We'll get this fixed and add a test.

I'm able to reproduce the bug, working on fixing it.

@panpan-wu you can use copytruncate option to prevent the file from being unlinked (docs in https://linux.die.net/man/8/logrotate).

@binarylogic this looks like a duplication of #2055, I think if copytruncate works we can close this issue and continue the discussion there.

You're correct. Let's close. I would like to update our docs to mention this #3249.

Was this page helpful?
0 / 5 - 0 ratings