From f4ebcf0dfc1a64bdd3ab5e2b70fa49bb4c1517b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Mon, 5 Oct 2020 19:18:35 +0200 Subject: [PATCH] Enable filestream input (#21533) The feature is enabled, but it is not yet documented. --- filebeat/input/default-inputs/inputs.go | 6 ++++-- filebeat/input/filestream/fswatch.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/filebeat/input/default-inputs/inputs.go b/filebeat/input/default-inputs/inputs.go index 52338a0af98..881f3664efd 100644 --- a/filebeat/input/default-inputs/inputs.go +++ b/filebeat/input/default-inputs/inputs.go @@ -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" @@ -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(), } } diff --git a/filebeat/input/filestream/fswatch.go b/filebeat/input/filestream/fswatch.go index d4bc1b5ea08..1b80971d835 100644 --- a/filebeat/input/filestream/fswatch.go +++ b/filebeat/input/filestream/fswatch.go @@ -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()