# How to prevent truncation of line?

**URL:** <https://discuss.elastic.co/t/how-to-prevent-truncation-of-line/207831>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 14, 2019, 7:54am UTC](https://discuss.elastic.co/t/how-to-prevent-truncation-of-line/207831 "2019-11-14T07:54:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.elastic.co/u/asp)\
**Post date:** [November 14, 2019, 7:54am UTC](https://discuss.elastic.co/t/how-to-prevent-truncation-of-line/207831/1 "2019-11-14T07:54:47Z")

</div>

Hi,

I have some events in elasticsearch where filebeat sets the log.flag to truncated.

From release notes I would say, that the truncation limit is configurable.

- Add tag "truncated" to "log.flags" if incoming line is longer than configured limit. [7991](https://github.com/elastic/beats/pull/7991)

Currently my event is cut at about 25MB.

What Key do I need to tune? I may have lines with maybe 200MB length.  
Filebeat is shipping to logstash.

Thanks, Andreas

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [November 15, 2019, 10:18am UTC](https://discuss.elastic.co/t/how-to-prevent-truncation-of-line/207831/2 "2019-11-15T10:18:57Z")

</div>

Hi @asp,

The config you are looking for is `max_bytes`: [https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#\_max\_bytes](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#_max_bytes)  
Best regards

---

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.elastic.co/u/asp)\
**Post date:** [November 15, 2019, 10:23am UTC](https://discuss.elastic.co/t/how-to-prevent-truncation-of-line/207831/3 "2019-11-15T10:23:45Z")

</div>

thanks a lot

---

<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 13, 2019, 10:23am UTC](https://discuss.elastic.co/t/how-to-prevent-truncation-of-line/207831/4 "2019-12-13T10:23:56Z")

</div>

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