# Can I add fields to json format data? (at filebeat)

**URL:** <https://discuss.elastic.co/t/can-i-add-fields-to-json-format-data-at-filebeat/178386>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 25, 2019, 7:33am UTC](https://discuss.elastic.co/t/can-i-add-fields-to-json-format-data-at-filebeat/178386 "2019-04-25T07:33:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xodn0812](https://avatars.discourse-cdn.com/v4/letter/x/c5a1d2/32.png) [@xodn0812](https://discuss.elastic.co/u/xodn0812)\
**Post date:** [April 25, 2019, 7:33am UTC](https://discuss.elastic.co/t/can-i-add-fields-to-json-format-data-at-filebeat/178386/1 "2019-04-25T07:33:29Z")

</div>

I take json format data and send it to logstash from filebeat.  
`{"key1":"val1","key2":"val2"}`  
At this time, I want to set index information in filebeat and send it to logstash.

How can I do it ??

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [April 25, 2019, 11:02am UTC](https://discuss.elastic.co/t/can-i-add-fields-to-json-format-data-at-filebeat/178386/2 "2019-04-25T11:02:02Z")

</div>

You can add fields using the `fields` setting either in the input or globally. Filebeat 7.0 also adds an `add_fields` processor. The Logstash output also has an [`index`](https://www.elastic.co/guide/en/beats/filebeat/current/logstash-output.html#logstash-index) setting.

---

<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 23, 2019, 11:02am UTC](https://discuss.elastic.co/t/can-i-add-fields-to-json-format-data-at-filebeat/178386/3 "2019-05-23T11:02:03Z")

</div>

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