-
Notifications
You must be signed in to change notification settings - Fork 97
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
Load grok patterns from /etc/logstash/patterns
#105
Comments
@joshuaspence I'm not against this, but I have some thoughts:
|
Regarding Windows, maybe the Logstash core should provide a method for accessing the configuration directory ( |
Another option might be to allow plugins to be considered figured globally. As in, if I could set |
I'm open to that. We used to have a flag (--patterns-path? I forget) but I removed it because Grok was they only plugin (out of hundreds) where there was a desire for a global setting. |
Another plugin where I have wanted to set a global default is |
@joshuaspence Since we have a Can you open an issue about this on elastic/logstash? |
Filed elastic/logstash#6609. |
Couldn't we simply load an environment variable LOGSTASH_FILTER_GROK_PATTERN_DIRS, which would take a colon separated list of paths? That would require no change to logstash, is easy to inject (in case of systemd you can simply use drop-in units, or maybe you control the deployment of logstash anyway), and should require very little effort to implement. |
Currently this plugin loads patterns from the
patterns/
directory withinlogstash-patterns-core
and also from$LOGSTASH_HOME/patterns
by default:On Logstash 5,
$LOGSTASH_HOME/patterns
is/usr/share/logstash/patterns
. It seems more common, however, for users to define custom grok patterns in/etc/logstash/patterns
rather than$LOGSTASH_HOME/patterns
. The officialelastic/logstash
Puppet module, for example, provides alogstash::patternfile
resource, which creates files in this directory. This works fine, but means that the user needs to addpatterns_dir => "/etc/logstash/patterns"
to everygrok
filter.It seems to me that it would be better if the
grok
filter simply loaded patterns from/etc/logstash/patterns
by default.The text was updated successfully, but these errors were encountered: