Skip to content

Add a file reloading feature to Logcollector#2022

Merged
snaow merged 2 commits into3.7from
3.7-logcollector-force-reload
Dec 3, 2018
Merged

Add a file reloading feature to Logcollector#2022
snaow merged 2 commits into3.7from
3.7-logcollector-force-reload

Conversation

@vikman90
Copy link
Copy Markdown
Member

@vikman90 vikman90 commented Dec 2, 2018

This closes #2018.

This PR aims to introduce a file reloading feature during the file checking stage in Logcollector.

This option fixes two problems in agents monitoring files in shared folders on VMware:

  1. In Linux agents, the vmhgfs file system cannot update the file inode while it is open. Logcollector would stop following a file if it is rotated.
  2. In Windows agents, the shared folder system cannot even update the file contents while it's open by Logcollector. This would prevent the file from being monitored.

@vikman90 vikman90 added type/bug Something isn't working module/logcollector module/agent Issues related to the agent daemon labels Dec 2, 2018
@vikman90 vikman90 self-assigned this Dec 2, 2018
@vikman90 vikman90 requested a review from snaow December 2, 2018 20:54
Close every file, sleep and open again, restoring the reading position.
@vikman90 vikman90 force-pushed the 3.7-logcollector-force-reload branch from 85b47fe to 697783c Compare December 2, 2018 22:27
@snaow snaow merged commit a994616 into 3.7 Dec 3, 2018
@snaow snaow deleted the 3.7-logcollector-force-reload branch December 3, 2018 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module/agent Issues related to the agent daemon module/logcollector type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants