# Export only custom JSON to elasticsearch

**URL:** <https://discuss.elastic.co/t/export-only-custom-json-to-elasticsearch/177229>\
**Category:** Beats\
**Created:** [April 17, 2019, 8:21am UTC](https://discuss.elastic.co/t/export-only-custom-json-to-elasticsearch/177229 "2019-04-17T08:21:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yonatan\_Omer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yonatan_omer/32/42450_2.png) [@Yonatan\_Omer](https://discuss.elastic.co/u/Yonatan_Omer)\
**Post date:** [April 17, 2019, 8:21am UTC](https://discuss.elastic.co/t/export-only-custom-json-to-elasticsearch/177229/1 "2019-04-17T08:21:36Z")

</div>

When providing Filebeat with text file containing rows with JSON , Filebeat export to Elasticsearch server meta info such as `log.offset` , `log.file.path` ect.  
Even commenting these lines in filebeat.yaml did not help:  
#- add\_host\_metadata: ~  
#- add\_cloud\_metadata: ~

how can we export the JSON to create the entire document ( including custom \_id)?

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [April 17, 2019, 4:35pm UTC](https://discuss.elastic.co/t/export-only-custom-json-to-elasticsearch/177229/2 "2019-04-17T16:35:27Z")

</div>

I think you might be looking for the `decode_json_fields` processor: [https://www.elastic.co/guide/en/beats/filebeat/current/decode-json-fields.html](https://www.elastic.co/guide/en/beats/filebeat/current/decode-json-fields.html).

---

<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:** [May 15, 2019, 6:43pm UTC](https://discuss.elastic.co/t/export-only-custom-json-to-elasticsearch/177229/3 "2019-05-15T18:43:21Z")

</div>

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