# Matched field truncated by grok

**URL:** https://discuss.elastic.co/t/matched-field-truncated-by-grok/66526
**Category:** Logstash
**Created:** [November 18, 2016, 11:22am UTC](https://discuss.elastic.co/t/matched-field-truncated-by-grok/66526 "2016-11-18T11:22:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![arussel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arussel/32/13281_2.png) [@arussel](https://discuss.elastic.co/u/arussel)
#### Post date: [November 18, 2016, 11:22am UTC](https://discuss.elastic.co/t/matched-field-truncated-by-grok/66526/1 "2016-11-18T11:22:31Z")

</div>

I do:

> grok { match =\> { "message" =\> "%{GREEDYDATA:foo}" } }

and I would expect that message and foo are the same, but foo is only the first ~4000 chars of message. I don't believe this is an event size issue, as I'm testing it with stdin/sdtout, and message is correctly shown as about 6000 chars. But foo has only the first 4000.

Alex

---

<div class="post-metadata">

### Author: ![arussel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arussel/32/13281_2.png) [@arussel](https://discuss.elastic.co/u/arussel)
#### Post date: [November 18, 2016, 1:04pm UTC](https://discuss.elastic.co/t/matched-field-truncated-by-grok/66526/2 "2016-11-18T13:04:01Z")

</div>

I've manage to find the root cause, I was testing using stdin/stdout, cut/pasting my data into the command line. It seems that my cut/paste buffer was 4096 chars. When echo/cat the input, it works as expected.

---

<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: [December 16, 2016, 1:04pm UTC](https://discuss.elastic.co/t/matched-field-truncated-by-grok/66526/3 "2016-12-16T13:04:30Z")

</div>

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