# Logstash: grok pars failure with multiple custom patterns

**URL:** <https://discuss.elastic.co/t/logstash-grok-pars-failure-with-multiple-custom-patterns/101992>\
**Category:** Logstash\
**Created:** [September 27, 2017, 2:07pm UTC](https://discuss.elastic.co/t/logstash-grok-pars-failure-with-multiple-custom-patterns/101992 "2017-09-27T14:07:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikkn](https://avatars.discourse-cdn.com/v4/letter/e/e95f7d/32.png) [@erikkn](https://discuss.elastic.co/u/erikkn)\
**Post date:** [September 27, 2017, 2:07pm UTC](https://discuss.elastic.co/t/logstash-grok-pars-failure-with-multiple-custom-patterns/101992/1 "2017-09-27T14:07:34Z")

</div>

Hi guys,

I am trying to pars a log file of ~500 lines to find the following two lines: flaked=yes && platform=aws so that I can add these lines as attributes for the given event/document.  
The configuration (logstash.conf):

```
filter {
  grok {
    patterns_dir => ["/usr/local/src/logstash/pattern"]
    match => { "message" => "%{FLAKED:flaked} %{PLATFORM:platform}" }
    }
  }

```

My pattern file:  
FLAKED flaked\s\*=\s\*._?$  
PLATFORM platform\s_=\s\*.\*?$

The configuration above results in the following error:  
"tags" : [  
"multiline",  
"\_grokparsefailure"  
]

The expressions are correct, it is working perfectly fine if I just use/call one of them. Do you guys know what the problem is and how to solve it?

Thanks!

---

<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:** [September 27, 2017, 8:07pm UTC](https://discuss.elastic.co/t/logstash-grok-pars-failure-with-multiple-custom-patterns/101992/2 "2017-09-27T20:07:47Z")

</div>

Use a `stdout { codec => rubydebug }` output to show us exactly what the event you want to match look like.

---

<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:** [October 25, 2017, 8:08pm UTC](https://discuss.elastic.co/t/logstash-grok-pars-failure-with-multiple-custom-patterns/101992/3 "2017-10-25T20:08:04Z")

</div>

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