# Help with grok pattern for logs parsen in logstash

**URL:** <https://discuss.elastic.co/t/help-with-grok-pattern-for-logs-parsen-in-logstash/153819>\
**Category:** Logstash\
**Created:** [October 24, 2018, 1:48pm UTC](https://discuss.elastic.co/t/help-with-grok-pattern-for-logs-parsen-in-logstash/153819 "2018-10-24T13:48:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bab/32/86201_2.png) [@bab](https://discuss.elastic.co/u/bab)\
**Post date:** [October 24, 2018, 1:48pm UTC](https://discuss.elastic.co/t/help-with-grok-pattern-for-logs-parsen-in-logstash/153819/1 "2018-10-24T13:48:57Z")

</div>

Hey all,  
i have a problem with my grok pattern i have 2 type of logs with have one different and if i create two grok matches with the patterns (all similar until LOGLEVEL pattern) look below:  
my logs

> [9/16/18 19:58:29:827 CEST] 0000006e SystemOut O CIWEB Warn : [ls94mn(unknown) @ 10.16.60.8] de.abc.response.ImportContactsChoiceList.executeFilter() User with bensl=g5082 not found.  
> [9/16/18 20:28:53:225 CEST] 000004cc SystemOut O CIWEB Error: [mfbr8qv(unknown) @ 10.16.60.8] com.ibm.ecm.struts.actions.p8.P8RetrieveItemsAction.executeAction()

my grok matches:

```
grok {
  break_on_match => false
   match => ["message","%{DATESTAMP:time} %{NOTSPACE} %{NOTSPACE:thread} %{WORD:log-source} []* %{NOTSPACE:sev} %{NOTSPACE:module} %{LOGLEVEL:log-level} \: %{GREEDYDATA:msg}" ]
   match => ["message","%{DATESTAMP:time} %{NOTSPACE} %{NOTSPACE:thread} %{WORD:log-source} []* %{NOTSPACE:sev} %{NOTSPACE:module} %{LOGLEVEL:log-level}\: %{GREEDYDATA:msg}" ]
 }

```

If I use this Grok with both matches, the filter only takes the error LogLevel.

please help in that, thank you all

---

<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:** [November 21, 2018, 1:50pm UTC](https://discuss.elastic.co/t/help-with-grok-pattern-for-logs-parsen-in-logstash/153819/2 "2018-11-21T13:50:55Z")

</div>

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