Skip to content

Commit f4ebcf0

Browse files
authored
Enable filestream input (elastic#21533)
The feature is enabled, but it is not yet documented.
1 parent 40b24dd commit f4ebcf0

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

filebeat/input/default-inputs/inputs.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package inputs
1919

2020
import (
2121
"github.com/elastic/beats/v7/filebeat/beater"
22+
"github.com/elastic/beats/v7/filebeat/input/filestream"
2223
"github.com/elastic/beats/v7/filebeat/input/unix"
2324
v2 "github.com/elastic/beats/v7/filebeat/input/v2"
2425
"github.com/elastic/beats/v7/libbeat/beat"
@@ -27,13 +28,14 @@ import (
2728

2829
func Init(info beat.Info, log *logp.Logger, components beater.StateStore) []v2.Plugin {
2930
return append(
30-
genericInputs(),
31+
genericInputs(log, components),
3132
osInputs(info, log, components)...,
3233
)
3334
}
3435

35-
func genericInputs() []v2.Plugin {
36+
func genericInputs(log *logp.Logger, components beater.StateStore) []v2.Plugin {
3637
return []v2.Plugin{
38+
filestream.Plugin(log, components),
3739
unix.Plugin(),
3840
}
3941
}

filebeat/input/filestream/fswatch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ type fileWatcher struct {
7474

7575
func newFileWatcher(paths []string, ns *common.ConfigNamespace) (loginp.FSWatcher, error) {
7676
if ns == nil {
77-
return newScannerWatcher(paths, nil)
77+
return newScannerWatcher(paths, common.NewConfig())
7878
}
7979

8080
watcherType := ns.Name()

0 commit comments

Comments
 (0)