# Custom Output log to elasticsearch

**URL:** <https://discuss.elastic.co/t/custom-output-log-to-elasticsearch/233668>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 21, 2020, 5:20am UTC](https://discuss.elastic.co/t/custom-output-log-to-elasticsearch/233668 "2020-05-21T05:20:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andres\_Felipe\_Vargas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andres_felipe_vargas/32/68788_2.png) [@Andres\_Felipe\_Vargas](https://discuss.elastic.co/u/Andres_Felipe_Vargas)\
**Post date:** [May 21, 2020, 5:20am UTC](https://discuss.elastic.co/t/custom-output-log-to-elasticsearch/233668/1 "2020-05-21T05:20:56Z")

</div>

Hi,  
I have json format strings into the .log files. And I need that filebeat insert that json strings as individual logs into a custom elastic search index. That index needs to have the same structure that the json format string. For example in my .log file I have  
-----example.log  
'''''''''''''''''''''''''''''''''''  
{"example":"test1"}  
{"example":"test2"}  
'''''''''''''''''''''''''''''''''''  
And In ElasticSearch i have an index filebeat-example-logs that has the following structure  
''''''''''''''''''''  
{  
example:""  
}  
'''''''''''''''''''  
So filebeat detects a new entry into example.log file and inserted exactly the same into the filebeat-example-logs index.

Thanks!

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [May 21, 2020, 7:29am UTC](https://discuss.elastic.co/t/custom-output-log-to-elasticsearch/233668/2 "2020-05-21T07:29:54Z")

</div>

Please take a look at docs and elasticsearch pipelines. Pipelines will help you to properly parse your input data.

---

<div class="post-metadata">

**Author:** ![Andres\_Felipe\_Vargas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andres_felipe_vargas/32/68788_2.png) [@Andres\_Felipe\_Vargas](https://discuss.elastic.co/u/Andres_Felipe_Vargas)\
**Post date:** [May 21, 2020, 2:32pm UTC](https://discuss.elastic.co/t/custom-output-log-to-elasticsearch/233668/3 "2020-05-21T14:32:26Z")

</div>

Thanks! I am going to read the docs

---

<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:** [June 18, 2020, 2:37pm UTC](https://discuss.elastic.co/t/custom-output-log-to-elasticsearch/233668/4 "2020-06-18T14:37:05Z")

</div>

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