Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing scanner configuration of filestream #21736

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion filebeat/input/filestream/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is watcherDebugKey in filebeat/input/filestream/fswatch.go related

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.

FileIdentity *common.ConfigNamespace `config:"file_identity"`
CleanInactive time.Duration `config:"clean_inactive" validate:"min=0"`
CleanRemoved bool `config:"clean_removed"`
Expand Down
11 changes: 5 additions & 6 deletions filebeat/input/filestream/fswatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down