# Config template "processors" section shadows custom processors in custom beats

**URL:** <https://discuss.elastic.co/t/config-template-processors-section-shadows-custom-processors-in-custom-beats/215578>\
**Category:** Beats\
**Created:** [January 18, 2020, 10:30pm UTC](https://discuss.elastic.co/t/config-template-processors-section-shadows-custom-processors-in-custom-beats/215578 "2020-01-18T22:30:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris-counteractive](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chris-counteractive/32/53568_2.png) [@chris-counteractive](https://discuss.elastic.co/u/chris-counteractive)\
**Post date:** [January 18, 2020, 10:30pm UTC](https://discuss.elastic.co/t/config-template-processors-section-shadows-custom-processors-in-custom-beats/215578/1 "2020-01-18T22:30:53Z")

</div>

When you build a custom beat, the build process creates your config file by concatenating your custom `_meta/beat.yml` and libbeat's [`_meta/config.yml.tmpl`](https://github.com/elastic/beats/blob/d9a4c9c240a9820fab15002592e5bb6db318543b/libbeat/_meta/config.yml.tmpl). When it does this, any custom processors you've defined in `_meta/config.yml.tmpl` are shadowed by the second `processors` section containing `add_host_metadata: ~` and ` - add_cloud_metadata: ~`. This leaves the user with the inconvenient task of either removing that second `processors` section after installation, or merging them with the important processors up top, which they really shouldn't have to do.

This happens in [`beats/dev-tools/mage/config.go`](https://github.com/elastic/beats/blob/d9a4c9c240a9820fab15002592e5bb6db318543b/dev-tools/mage/config.go), and there doesn't appear to be any configuration that'll suppress the inclusion of that second `processors` section, as the merge is just a [simple file concat](https://github.com/elastic/beats/blob/d9a4c9c240a9820fab15002592e5bb6db318543b/dev-tools/mage/config.go#L197) and the `.tmpl` file conditionals don't have any option for leaving it out entirely.

My custom beat ([`o365beat`](https://github.com/counteractive/o365beat)) includes processors in its config to do some important things, and we don't want to put it on the users to fix this issue. We're considering removing the second section later in the build, which will be tricky because we won't have any control of future changes to that file.

Would you be open to a pull request that conditionally excludes the entire template processors section from libbeat's `_meta/config.yml.tmpl`? I couldn't find any issues/PRs referencing this behavior.

See [this o365beat issue](https://github.com/counteractive/o365beat/issues/9) for more details.

---

<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 15, 2020, 10:38pm UTC](https://discuss.elastic.co/t/config-template-processors-section-shadows-custom-processors-in-custom-beats/215578/2 "2020-02-15T22:38:29Z")

</div>

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