# Changing grok pattern gradually

**URL:** <https://discuss.elastic.co/t/changing-grok-pattern-gradually/115333>\
**Category:** Logstash\
**Created:** [January 12, 2018, 4:17pm UTC](https://discuss.elastic.co/t/changing-grok-pattern-gradually/115333 "2018-01-12T16:17:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [January 12, 2018, 4:17pm UTC](https://discuss.elastic.co/t/changing-grok-pattern-gradually/115333/1 "2018-01-12T16:17:20Z")

</div>

Hi!

I'd like to expand the logging to have more granular data available. However, the log format can't be updated on every instance, also in some cases, a backup restore will reset the changes. My issue is if I extend the grok pattern, it'll cause parse error for the fields not present in the current log format. Also, I would like not to rename the log itself.  
Is there a way to set a conditional which won't result in a parse error?

Thank you!  
YvorL

---

<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:** [January 23, 2018, 9:12pm UTC](https://discuss.elastic.co/t/changing-grok-pattern-gradually/115333/2 "2018-01-23T21:12:23Z")

</div>

The grok filter's `tag_on_failure` option can be set to an empty array to avoid tagging events with `_grokparsefailure`.

---

<div class="post-metadata">

**Author:** ![YvorL](https://avatars.discourse-cdn.com/v4/letter/y/9fc348/32.png) [@YvorL](https://discuss.elastic.co/u/YvorL)\
**Post date:** [January 24, 2018, 10:58am UTC](https://discuss.elastic.co/t/changing-grok-pattern-gradually/115333/3 "2018-01-24T10:58:14Z")

</div>

Thank you!  
I'll check it, but if I'm not mistaken, it'll only prevent showing that the parsing was unsuccessful and I still won't get the data I need from the "old" log format.

---

<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:** [January 25, 2018, 9:33pm UTC](https://discuss.elastic.co/t/changing-grok-pattern-gradually/115333/4 "2018-01-25T21:33:04Z")

</div>

I don't understand. If you give an example it might be easier to get what you're trying to do.

---

<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:** [February 22, 2018, 9:33pm UTC](https://discuss.elastic.co/t/changing-grok-pattern-gradually/115333/5 "2018-02-22T21:33:35Z")

</div>

Closed on February 22, 2018, 9:33pm UTC

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