# Grok: logstash package does not include default patterns

**URL:** <https://discuss.elastic.co/t/grok-logstash-package-does-not-include-default-patterns/40297>\
**Category:** Logstash\
**Created:** [January 27, 2016, 10:40pm UTC](https://discuss.elastic.co/t/grok-logstash-package-does-not-include-default-patterns/40297 "2016-01-27T22:40:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![biswajit86](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@biswajit86](https://discuss.elastic.co/u/biswajit86)\
**Post date:** [January 27, 2016, 10:40pm UTC](https://discuss.elastic.co/t/grok-logstash-package-does-not-include-default-patterns/40297/1 "2016-01-27T22:40:58Z")

</div>

Hi,

I am currently running logstash-2.1.1 . While using grok patterns, I am not able to get the built-in logstash patterns for grok (like `SPACE`, `NOTSPACE` etc by default). As a result I had to download all the patterns into a directory and add the `patterns_dir` construct in every grok filter, which makes my config really long.

Is there a way to put all the grok patterns into any logstash directory so that the grok filter will pick them up by default instead of me having to define explicitly the `patterns_dir` in every grok construct ?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 28, 2016, 7:16am UTC](https://discuss.elastic.co/t/grok-logstash-package-does-not-include-default-patterns/40297/2 "2016-01-28T07:16:04Z")

</div>

If you place your pattern files in the same directory as the standard pattern files things will work, but probably only until the logstash-patterns-core package is updated. If you specify `patterns_dir` Logstash _should_ look both there and in the standard location. If that doesn't work, try enabling verbose log output with `--verbose` or even `--debug` to get additional clues about what's going on. Logstash will log all loaded patterns.

---

<div class="post-metadata">

**Author:** ![biswajit86](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@biswajit86](https://discuss.elastic.co/u/biswajit86)\
**Post date:** [January 28, 2016, 4:50pm UTC](https://discuss.elastic.co/t/grok-logstash-package-does-not-include-default-patterns/40297/3 "2016-01-28T16:50:29Z")

</div>

That's the question. what is the standard pattern files directory ?

I do not see the standard patterns directory in the logstash package I downloaded. I usually download the [logstash tar.gz](https://download.elastic.co/logstash/logstash/logstash-2.1.1.tar.gz) file from the downloads page

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 28, 2016, 5:53pm UTC](https://discuss.elastic.co/t/grok-logstash-package-does-not-include-default-patterns/40297/4 "2016-01-28T17:53:20Z")

</div>

> That's the question. what is the standard pattern files directory ?

Here:

```auto
$ tar ztf logstash-2.1.1.tar.gz | grep patterns/grok-patterns
logstash-2.1.1/vendor/bundle/jruby/1.9/gems/logstash-patterns-core-2.0.2/patterns/grok-patterns

```

But again, storing files there is most likely a bad idea.

---

<div class="post-metadata">

**Author:** ![biswajit86](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@biswajit86](https://discuss.elastic.co/u/biswajit86)\
**Post date:** [January 28, 2016, 8:30pm UTC](https://discuss.elastic.co/t/grok-logstash-package-does-not-include-default-patterns/40297/5 "2016-01-28T20:30:44Z")

</div>

> [@magnusbaeck](#):
>
> but probably only until the logstash-patterns-core package is updated.

Thanks for that

Could you please expand on what you meant by ` but probably only until the logstash-patterns-core package is updated` in your original reply

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 28, 2016, 8:41pm UTC](https://discuss.elastic.co/t/grok-logstash-package-does-not-include-default-patterns/40297/6 "2016-01-28T20:41:21Z")

</div>

If you store the files in the directory of version 2.0.2 of the plugin your files will most likely not be used when you update to e.g. version 2.0.3.

---

<div class="post-metadata">

**Author:** ![biswajit86](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@biswajit86](https://discuss.elastic.co/u/biswajit86)\
**Post date:** [January 28, 2016, 10:12pm UTC](https://discuss.elastic.co/t/grok-logstash-package-does-not-include-default-patterns/40297/7 "2016-01-28T22:12:04Z")

</div>

Thanks . that helped

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:13am UTC](https://discuss.elastic.co/t/grok-logstash-package-does-not-include-default-patterns/40297/8 "2017-07-06T05:13:51Z")

</div>


