Skip to content

Commit

Permalink
Enable filestream input (#21533)
Browse files Browse the repository at this point in the history
The feature is enabled, but it is not yet documented.
  • Loading branch information
kvch authored Oct 5, 2020
1 parent 40b24dd commit f4ebcf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions filebeat/input/default-inputs/inputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package inputs

import (
"github.com/elastic/beats/v7/filebeat/beater"
"github.com/elastic/beats/v7/filebeat/input/filestream"
"github.com/elastic/beats/v7/filebeat/input/unix"
v2 "github.com/elastic/beats/v7/filebeat/input/v2"
"github.com/elastic/beats/v7/libbeat/beat"
Expand All @@ -27,13 +28,14 @@ import (

func Init(info beat.Info, log *logp.Logger, components beater.StateStore) []v2.Plugin {
return append(
genericInputs(),
genericInputs(log, components),
osInputs(info, log, components)...,
)
}

func genericInputs() []v2.Plugin {
func genericInputs(log *logp.Logger, components beater.StateStore) []v2.Plugin {
return []v2.Plugin{
filestream.Plugin(log, components),
unix.Plugin(),
}
}
2 changes: 1 addition & 1 deletion filebeat/input/filestream/fswatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ type fileWatcher struct {

func newFileWatcher(paths []string, ns *common.ConfigNamespace) (loginp.FSWatcher, error) {
if ns == nil {
return newScannerWatcher(paths, nil)
return newScannerWatcher(paths, common.NewConfig())
}

watcherType := ns.Name()
Expand Down

0 comments on commit f4ebcf0

Please sign in to comment.