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

ignore configuration files not ending in .conf #6979

Closed
inqueue opened this Issue Apr 26, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@inqueue

inqueue commented Apr 26, 2017

  • Version: 5.3.1

Today, Logstash loads all files sitting in /etc/logstash/conf.d. This can be problematic if a user makes a copy of a configuration file, for example, using the .bak extension, as unexpected result occur. This can be especially problematic for Kafka as it can lead an unsuspecting user to balancing issues that are not immediately apparent. Please require and document the use of .conf file extensions in /etc/logstash/conf.d.

@inqueue inqueue added the enhancement label Apr 26, 2017

@jordansissel

This comment has been minimized.

Show comment
Hide comment
@jordansissel

jordansissel Apr 27, 2017

Contributor

Well, we do document the behavior, but that's no excuse -- documented behavior is meaningless if users are tripping over it, so we must fix!

Proposal:

  • Change the default to load "/etc/logstash/conf.d/*.conf" [1]
  • And to help users more, we should log any files ignored by a wildcard -- like if there is a "foo.conf.bak" we should log an INFO message that says we are skipping it because it doesn't match the wildcard.
  • And we should update our docs anywhere we specify the default load path for rpm and deb packages to be the new path above.

[1] https://github.com/elastic/logstash/blob/master/pkg/centos/after-install.sh#L5 (and other after-install scripts do this as well)

Contributor

jordansissel commented Apr 27, 2017

Well, we do document the behavior, but that's no excuse -- documented behavior is meaningless if users are tripping over it, so we must fix!

Proposal:

  • Change the default to load "/etc/logstash/conf.d/*.conf" [1]
  • And to help users more, we should log any files ignored by a wildcard -- like if there is a "foo.conf.bak" we should log an INFO message that says we are skipping it because it doesn't match the wildcard.
  • And we should update our docs anywhere we specify the default load path for rpm and deb packages to be the new path above.

[1] https://github.com/elastic/logstash/blob/master/pkg/centos/after-install.sh#L5 (and other after-install scripts do this as well)

@jordansissel jordansissel added v5.5.0 v6.0.0 and removed v5.5.0 labels Apr 27, 2017

@jordansissel

This comment has been minimized.

Show comment
Hide comment
@jordansissel

jordansissel Apr 27, 2017

Contributor

@inqueue for what it's worth, I have seen similar problems but different file naming practices. The '*.conf won't solve this problem generally because not everyone has the same personal tactics for "backup the file and make a change"- -- for example

  • User wants to try a change, and prefers to call files old_somename...
  • User does cp stuff.conf old_stuff.conf
  • User edits stuff.conf
  • User runs logstash, and unexpectedly, both stuff.conf and old_stuff.conf are used.
Contributor

jordansissel commented Apr 27, 2017

@inqueue for what it's worth, I have seen similar problems but different file naming practices. The '*.conf won't solve this problem generally because not everyone has the same personal tactics for "backup the file and make a change"- -- for example

  • User wants to try a change, and prefers to call files old_somename...
  • User does cp stuff.conf old_stuff.conf
  • User edits stuff.conf
  • User runs logstash, and unexpectedly, both stuff.conf and old_stuff.conf are used.

suyograo added a commit to suyograo/logstash that referenced this issue May 17, 2017

suyograo added a commit to suyograo/logstash that referenced this issue May 19, 2017

suyograo added a commit that referenced this issue May 19, 2017

Only glob *.conf by default in conf.d folder (#7130)
* Only glob *.conf by default in conf.d folder

Fixes #6979, Fixes #1831

untergeek added a commit that referenced this issue May 19, 2017

Only glob *.conf by default in conf.d folder (#7130)
* Only glob *.conf by default in conf.d folder

Fixes #6979, Fixes #1831
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment