# Preserve original message from Beats for later usage

**URL:** <https://discuss.elastic.co/t/preserve-original-message-from-beats-for-later-usage/125214>\
**Category:** Logstash\
**Created:** [March 22, 2018, 2:58pm UTC](https://discuss.elastic.co/t/preserve-original-message-from-beats-for-later-usage/125214 "2018-03-22T14:58:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![admlko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/admlko/32/21787_2.png) [@admlko](https://discuss.elastic.co/u/admlko)\
**Post date:** [March 22, 2018, 2:58pm UTC](https://discuss.elastic.co/t/preserve-original-message-from-beats-for-later-usage/125214/1 "2018-03-22T14:58:24Z")

</div>

Hi!

I have set up Logstash to preserve original message in "message" field for archiving purposes.  
Every night, I run a pipeline, which reads everything from yesterday and outputs it to a file on disk.  
The idea is to be able to read them back to Elasticsearch via Logstash, when they are rotated away after a long time.

It works well, but I have a problem with events read using Beats. I have not found a way to preserve original message from Beats events. The cleanest way would be to use the same pipeline to read also events created by any beat, but for that I have to encode beats event back to JSON and save it as a string in a field in the event.

Any suggestions how to achieve this, or better approaches?

---

<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:** [April 19, 2018, 2:58pm UTC](https://discuss.elastic.co/t/preserve-original-message-from-beats-for-later-usage/125214/2 "2018-04-19T14:58:38Z")

</div>

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