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 filebeat.config.path as replacement for filebeat.config_dir #4051

Merged
merged 1 commit into from
Apr 21, 2017

Conversation

ruflin
Copy link
Member

@ruflin ruflin commented Apr 19, 2017

The reload feature can also be used to load configuration files once. This enables the feature to load config options once through filebeat.config.path: .... The difference to config_dir is that only the prospectors have to be configured in the file and not the full filebeat config tree.

filebeat.config_dir will be removed in a follow up PR.

As the reloading is now also used for just loading, the code could use some refactoring in the future to make this more obvious.

@ruflin ruflin force-pushed the move-config-dir branch 3 times, most recently from fe162cd to 10fac21 Compare April 19, 2017 13:29
@ruflin
Copy link
Member Author

ruflin commented Apr 20, 2017

jenkins, retest it

if *once && config.ProspectorReload.Enabled() {
return nil, errors.New("prospector reloading and -once cannot be used together.")
if *once && config.ConfigProspector.Enabled() {
return nil, errors.New("prospector configs and -once cannot be used together.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

[golint] reported by reviewdog 🐶
error strings should not be capitalized or end with punctuation or a newline

@@ -33,7 +33,7 @@ func New(out prospector.Outlet, prospectorConfigs []*common.Config, beatDone cha
}, nil
}

func (c *Crawler) Start(r *registrar.Registrar, reloaderConfig *common.Config) error {
func (c *Crawler) Start(r *registrar.Registrar, configProspectors *common.Config) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

[golint] reported by reviewdog 🐶
exported method Crawler.Start should have comment or be unexported

The reload feature can also be used to load configuration files once. This enables the feature to load config options once through `filebeat.config.path: ...`. The difference to config_dir is that only the prospectors have to be configured in the file and not the full filebeat config tree.

`filebeat.config_dir` will be removed in a follow up PR.

As the reloading is now also used for just loading, the code could use some refactoring in the future to make this more obvious.
@ruflin
Copy link
Member Author

ruflin commented Apr 20, 2017

jenkins, retest it

@monicasarbu monicasarbu merged commit d824018 into elastic:master Apr 21, 2017
@monicasarbu monicasarbu deleted the move-config-dir branch April 21, 2017 07:56
@Prinzka
Copy link

Prinzka commented Dec 19, 2017

This does not appear to be functional.
I've tested on both 6.1 and 6.0.0.1
Filebeat starts without errors but does not load any prospectors from files in the config path.
I simply filebeat.config.path back to filebeat.config.dir and it loads all the prospectors in the config path without issue. It throws the deprecated warning, but at least it's functional.

@ruflin
Copy link
Member Author

ruflin commented Dec 20, 2017

@Prinzka Please open a topic on discuss and share your config files and filebeat logs there: https://discuss.elastic.co/c/beats/filebeat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants