# Poorly structured log file

**URL:** https://discuss.elastic.co/t/poorly-structured-log-file/1935
**Category:** Logstash
**Created:** [June 4, 2015, 1:32pm UTC](https://discuss.elastic.co/t/poorly-structured-log-file/1935 "2015-06-04T13:32:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Paolo](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@Paolo](https://discuss.elastic.co/u/Paolo)
#### Post date: [June 4, 2015, 1:32pm UTC](https://discuss.elastic.co/t/poorly-structured-log-file/1935/1 "2015-06-04T13:32:40Z")

</div>

Hello All,  
I am trying to analyze a log file with the logstash-elasticsearch-kibana setup.  
I am still a newby about these nice products and I have a big doubt.

The kind of files I will be working with have very different event structures  
(there are dozens, maybe hundreds of kinds of events), some of the events are multiline, some not, some contain JAVA code, some contain lists of addresses, some just lines of asterisks, etc...

As far as I understand the configuration of logstash (with grok for example) has to be very precise and even a space mismatch can stop the pipeline. Is there a (kind of easy) way to handle a situation like mine?

Do you have any suggestion?

thank you,  
Paolo

---

<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: [June 4, 2015, 1:41pm UTC](https://discuss.elastic.co/t/poorly-structured-log-file/1935/2 "2015-06-04T13:41:10Z")

</div>

You can specify multiple grok patterns and have Logstash pick the first one that matches.

Space mismatches won't stop the pipeline. The grok filter will tag the message with `_grokparsefailure` and pass it on.

---

<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: [July 6, 2017, 5:38am UTC](https://discuss.elastic.co/t/poorly-structured-log-file/1935/3 "2017-07-06T05:38:33Z")

</div>


