# Unable to limit FileBeat fields

**URL:** https://discuss.elastic.co/t/unable-to-limit-filebeat-fields/261405
**Category:** Beats
**Tags:** filebeat
**Created:** [January 18, 2021, 10:18am UTC](https://discuss.elastic.co/t/unable-to-limit-filebeat-fields/261405 "2021-01-18T10:18:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ChrisaT](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@ChrisaT](https://discuss.elastic.co/u/ChrisaT)
#### Post date: [January 18, 2021, 10:18am UTC](https://discuss.elastic.co/t/unable-to-limit-filebeat-fields/261405/1 "2021-01-18T10:18:18Z")

</div>

Good morning, a housekeeping question  
We are processing data from a number of API's using Filebeat. The fields we define are working fine but what we have found is that field for all modules are also being added. The index pattern is showing over 5000 fields. We have tried removing them from the fields.yml file.

Can anyone offer a solution on how to remove the fields we don't explicitly define?

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: [January 18, 2021, 2:34pm UTC](https://discuss.elastic.co/t/unable-to-limit-filebeat-fields/261405/2 "2021-01-18T14:34:13Z")

</div>

You can consider a bit different setup, using Fleet and Elastic Agent. Both ones install only fields which will be used.

---

<div class="post-metadata">

### Author: ![ChrisaT](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@ChrisaT](https://discuss.elastic.co/u/ChrisaT)
#### Post date: [January 20, 2021, 5:50pm UTC](https://discuss.elastic.co/t/unable-to-limit-filebeat-fields/261405/3 "2021-01-20T17:50:27Z")

</div>

Hi, we found the issue. We configured our template file as yml. It needs to be JSON.  
Simple fix.

---

<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: [February 17, 2021, 7:50pm UTC](https://discuss.elastic.co/t/unable-to-limit-filebeat-fields/261405/4 "2021-02-17T19:50:40Z")

</div>

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