Skip to content

Commit

Permalink
[filestream] revert change in symlink resolution (elastic#36557)
Browse files Browse the repository at this point in the history
* [filestream] revert change in symlink resolution

---------

Co-authored-by: Tiago Queiroz <[email protected]>
Co-authored-by: Denis <[email protected]>
  • Loading branch information
3 people authored and Scholar-Li committed Feb 5, 2024
1 parent c6a8e67 commit c4e0a9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Remove 'onFilteredOut' and 'onDroppedOnPublish' callback logs {issue}36299[36299] {pull}36399[36399]
- Added a fix for Crowdstrike pipeline handling process arrays {pull}36496[36496]
- Ensure winlog input retains metric collection when handling recoverable errors. {issue}36479[36479] {pull}36483[36483]
- Revert error introduced in {pull}35734[35734] when symlinks can't be resolved in filestream. {pull}36557[36557]

*Heartbeat*

Expand Down
3 changes: 2 additions & 1 deletion filebeat/input/filestream/fswatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,8 @@ func (s *fileScanner) getIngestTarget(filename string) (it ingestTarget, err err

it.originalFilename, err = filepath.EvalSymlinks(it.filename)
if err != nil {
return it, fmt.Errorf("failed to resolve the symlink %q: %w", it.filename, err)
s.log.Debugf("finding path to original file has failed %s: %+v", it.filename, err)
it.originalFilename = it.filename
}

if s.isFileExcluded(it.originalFilename) {
Expand Down

0 comments on commit c4e0a9e

Please sign in to comment.