From c0e0d1e911baac89ca214478adfe2d11422e5e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Thu, 15 Oct 2020 12:33:49 +0200 Subject: [PATCH] Add missing configuration annotations (#21736) (#21770) (cherry picked from commit b0fbfaed277c6c04c23a4be8d30c2a512d915084) --- filebeat/input/filestream/config.go | 2 +- filebeat/input/filestream/fswatch.go | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/filebeat/input/filestream/config.go b/filebeat/input/filestream/config.go index c2b1e838ee5..5b582ccf6e8 100644 --- a/filebeat/input/filestream/config.go +++ b/filebeat/input/filestream/config.go @@ -34,7 +34,7 @@ type config struct { Paths []string `config:"paths"` Close closerConfig `config:"close"` - FileWatcher *common.ConfigNamespace `config:"file_watcher"` + FileWatcher *common.ConfigNamespace `config:"prospector"` FileIdentity *common.ConfigNamespace `config:"file_identity"` CleanInactive time.Duration `config:"clean_inactive" validate:"min=0"` CleanRemoved bool `config:"clean_removed"` diff --git a/filebeat/input/filestream/fswatch.go b/filebeat/input/filestream/fswatch.go index 1b80971d835..e988fb3cee9 100644 --- a/filebeat/input/filestream/fswatch.go +++ b/filebeat/input/filestream/fswatch.go @@ -57,9 +57,9 @@ type fileScanner struct { type fileWatcherConfig struct { // Interval is the time between two scans. - Interval time.Duration + Interval time.Duration `config:"check_interval"` // Scanner is the configuration of the scanner. - Scanner fileScannerConfig + Scanner fileScannerConfig `config:",inline"` } // fileWatcher gets the list of files from a FSWatcher and creates events by @@ -212,10 +212,9 @@ func (w *fileWatcher) Event() loginp.FSEvent { } type fileScannerConfig struct { - Paths []string - ExcludedFiles []match.Matcher - Symlinks bool - RecursiveGlob bool + ExcludedFiles []match.Matcher `config:"exclude_files"` + Symlinks bool `config:"symlinks"` + RecursiveGlob bool `config:"recursive_glob"` } func defaultFileScannerConfig() fileScannerConfig {