# Help with Grok pattern with space in field?

**URL:** <https://discuss.elastic.co/t/help-with-grok-pattern-with-space-in-field/80189>\
**Category:** Logstash\
**Created:** [March 27, 2017, 6:55pm UTC](https://discuss.elastic.co/t/help-with-grok-pattern-with-space-in-field/80189 "2017-03-27T18:55:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZillaG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zillag/32/10505_2.png) [@ZillaG](https://discuss.elastic.co/u/ZillaG)\
**Post date:** [March 27, 2017, 6:55pm UTC](https://discuss.elastic.co/t/help-with-grok-pattern-with-space-in-field/80189/1 "2017-03-27T18:55:55Z")

</div>

I have the following log...

`2017-03-27 14:24:50,607 DEBUG :Finalizer thread [com.company.classname]`

...and the following filter

```
filter {
  grok {
    match => {
      "message" => [
        "%{TIMESTAMP_ISO8601:logdate}%{SPACE}%{LOGLEVEL:loglevel}%{SPACE}:%{HELP_WITH_PATTERN:thread}"
      ]
    }
  }
}

```

What should "HELP\_WITH\_PATTERN" be so I get thread =\> "Finalizer thread"

---

<div class="post-metadata">

**Author:** ![ZillaG](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zillag/32/10505_2.png) [@ZillaG](https://discuss.elastic.co/u/ZillaG)\
**Post date:** [March 27, 2017, 7:06pm UTC](https://discuss.elastic.co/t/help-with-grok-pattern-with-space-in-field/80189/2 "2017-03-27T19:06:19Z")

</div>

I should read [my own posts](https://discuss.elastic.co/t/how-to-group-space-separated-parts-of-a-message-into-one-field-in-grok/77181)

---

<div class="post-metadata">

**Author:** ![whyapenny](https://avatars.discourse-cdn.com/v4/letter/w/90db22/32.png) [@whyapenny](https://discuss.elastic.co/u/whyapenny)\
**Post date:** [March 27, 2017, 8:13pm UTC](https://discuss.elastic.co/t/help-with-grok-pattern-with-space-in-field/80189/3 "2017-03-27T20:13:43Z")

</div>

you could also create your own pattern:  
NOTBRACKET [^[]+

Then call that:  
%{TIMESTAMP\_ISO8601:logdate}%{SPACE}%{LOGLEVEL:loglevel}%{SPACE}:%{NOTBRACKET:thread}${GREEDYDATA:theRest}

---

<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:** [April 24, 2017, 8:14pm UTC](https://discuss.elastic.co/t/help-with-grok-pattern-with-space-in-field/80189/4 "2017-04-24T20:14:02Z")

</div>

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