# Patterns\_dir in logstash not working

**URL:** <https://discuss.elastic.co/t/patterns-dir-in-logstash-not-working/170124>\
**Category:** Logstash\
**Created:** [February 27, 2019, 9:11am UTC](https://discuss.elastic.co/t/patterns-dir-in-logstash-not-working/170124 "2019-02-27T09:11:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas\_Langer](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Tomas\_Langer](https://discuss.elastic.co/u/Tomas_Langer)\
**Post date:** [February 27, 2019, 9:11am UTC](https://discuss.elastic.co/t/patterns-dir-in-logstash-not-working/170124/1 "2019-02-27T09:11:07Z")

</div>

Hello,  
I have a problem with logstasth configuration. I will try to explain my problem:  
I run ELK stack in Docker image on Virtual Linux machine from Win 10.  
I have this part in file logstash.conf (UTF-8 LF line endings):  
grok {  
patterns\_dir =\> ["/vagrant/config/patterns"]  
patterns\_files\_glob =\> ["\*"]  
match =\> {"message" =\> "%{THREAD:log\_thread}"}  
}  
in patterns dir is file "eps" (UTF-8 LF line endings) with my regular expressions:  
THREAD ((:\d\d\d [).+?(?=]))  
TRN\_TYPE EPSTransaction.transactionType\s=  
But when I restart logstash and check its log I see error:  
logstash\_1 | [2019-02-27T08:09:22,967][ERROR][logstash.pipeline] Pipeline aborted due to error {:pipeline\_id=\>"main", :exception=\>#\<Grok::PatternError: pattern %{THREAD:log\_thread} not defined\>, :backtrace=\> ...  
I dont know what is wrong. When I run:  
sudo find / -type f -name 'eps'  
on virtual machine then I got:  
/vagrant/config/patterns/eps so i mean the path is OK. Permissions for the file is also OK.  
Thank you for your help.  
Tomas

---

<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:** [March 27, 2019, 9:11am UTC](https://discuss.elastic.co/t/patterns-dir-in-logstash-not-working/170124/2 "2019-03-27T09:11:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
