# Logstash / grok pattern file

**URL:** https://discuss.elastic.co/t/logstash-grok-pattern-file/68175
**Category:** Logstash
**Created:** [December 6, 2016, 1:13pm UTC](https://discuss.elastic.co/t/logstash-grok-pattern-file/68175 "2016-12-06T13:13:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Deepak\_Mann](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@Deepak\_Mann](https://discuss.elastic.co/u/Deepak_Mann)
#### Post date: [December 6, 2016, 1:13pm UTC](https://discuss.elastic.co/t/logstash-grok-pattern-file/68175/1 "2016-12-06T13:13:50Z")

</div>

^(?:%{LOGLEVEL:level}):\s\*%{DATA:message}\s\*(?:%{JAVACLASS:caller\_class})\s+[%{WORD:loglevel}]\s+([\s\*\S+\s+%{BASE10NUM:tstamp}._?]\s+)+([\s_\S+\s+%{BASE10NUM:memory}\S\*\s+\S+\s+%{BASE10NUM:total}.\*?])

I have got this grok pattern, how shall I use this to modify my logtash config or create a new pattern file for this

can someone give me a walkthrough

---

<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: [December 6, 2016, 1:31pm UTC](https://discuss.elastic.co/t/logstash-grok-pattern-file/68175/2 "2016-12-06T13:31:01Z")

</div>

You can use it directly in a grok filter, or you can store it in a grok pattern file. That's up to you. Whichever option you choose I think it's pretty well documented at [https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html). Perhaps you have a more specific question?

---

<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: [January 3, 2017, 1:31pm UTC](https://discuss.elastic.co/t/logstash-grok-pattern-file/68175/3 "2017-01-03T13:31:12Z")

</div>

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