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

libbeat: can't override logging.files.name by command line option if filebeat.full.yml is loaded #2918

Closed
cyrilleverrier opened this issue Nov 2, 2016 · 4 comments

Comments

@cyrilleverrier
Copy link
Contributor

cyrilleverrier commented Nov 2, 2016

This bug is reproducible with any beats (filebeats, metrics beat, custom beat, etc.)

  • Version: libbeat v5.0.0
  • Operating System: Linux Ubuntu
  • Steps to Reproduce:
  1. cd <...>/github.com/elastic/beats/filebeat
  2. make
  3. ./filebeat -c filebeat.yml -E logging.files.name=override1_filename.log
  4. ./filebeat -c filebeat.full.yml -E logging.files.name=override2_filename.log
  5. ls logs

Expected result:
In both cases, the log filename is overridden

$ls logs
 override1_filename.log override2_filename.log

Actual result:
The log filename is not overridden if the filebeat.full.yml is loaded

$ls logs
filebeat  override1_filename.log

There is a problem when merging the configuration from file and from command line.

filebeat.full.yml contains the section logging.files but is empty
filebeat.yml does not contain the section logging.files, and get default values

@ruflin
Copy link
Member

ruflin commented Nov 3, 2016

@urso I think this is related to ucfg. Can you have a look?
@cyrilleverrier Thanks for reporting.

@cyrilleverrier
Copy link
Contributor Author

note: @urso this bug is still present with ucfg v0.4.4

@urso
Copy link

urso commented Jan 7, 2017

Testing with console output only yet, using -E works for me.

I started PR #3304 adding debug output of config file loaded. This will help debugging the issue.

Will have a look at the described issue tomorrow.

@urso
Copy link

urso commented Jan 8, 2017

fix in progress: elastic/go-ucfg#85

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

No branches or pull requests

3 participants