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

Make default config option platform independent. #419

Closed
ruflin opened this issue Dec 2, 2015 · 4 comments
Closed

Make default config option platform independent. #419

ruflin opened this issue Dec 2, 2015 · 4 comments

Comments

@ruflin
Copy link
Contributor

ruflin commented Dec 2, 2015

Currently we have in libbeat platform specific code based on where to look for the log file: https://github.com/elastic/libbeat/blob/master/cfgfile/cfgfile.go#L32

I suggest that we set the same directory as the binary to the default location and configure platform specific directories with the -c flag in the startup service scripts.

This will make it possible to download a binary with a config and start it also without the -c flag by default. This is similar to elasticsearch which checks the file in the config directory.

For reference see also discussion here: https://github.com/elastic/libbeat/pull/341#issuecomment-160987964

@monicasarbu
Copy link
Contributor

I think it's a good idea to solve the problem this way, by looking in the same directory (in the etc directory?) by default and set -c option in the startup service scripts. We can then delete the check from the cfgfile.go.

@monicasarbu
Copy link
Contributor

Kibana & Elasticsearch keep the configuration files under config. We can also rename the etc directory to config to be similar.

@ruflin
Copy link
Contributor Author

ruflin commented Dec 3, 2015

@monicasarbu I like the idea of renaming it to config especially as it is consistent elasticsearch. Renaming the etc. directory will bring naming conflicts but is definitively doable. The less nice part is that currently our download has 3 files, afterwards it would be 1 binary + folder with 2 files (config and template)? Still +1 on this change.

@andrewkroh
Copy link
Member

The default config file location is now platform independent. It looks in the directory where the beat binary lives for a <beatname>.yml. No changes were made to add a config.

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

No branches or pull requests

3 participants