# "make collect" for beat based on metricbeat overwrite some configs

**URL:** <https://discuss.elastic.co/t/make-collect-for-beat-based-on-metricbeat-overwrite-some-configs/108518>\
**Category:** Beats\
**Tags:** beats-development\
**Created:** [November 21, 2017, 6:42am UTC](https://discuss.elastic.co/t/make-collect-for-beat-based-on-metricbeat-overwrite-some-configs/108518 "2017-11-21T06:42:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shino](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shino/32/23639_2.png) [@shino](https://discuss.elastic.co/u/shino)\
**Post date:** [November 21, 2017, 6:42am UTC](https://discuss.elastic.co/t/make-collect-for-beat-based-on-metricbeat-overwrite-some-configs/108518/1 "2017-11-21T06:42:50Z")

</div>

Hi there,

I created a beat based on metricbeat by following "Creating a Beat based on Metricbeat | Beats Developer Guide [6.0] | Elastic" [https://www.elastic.co/guide/en/beats/devguide/6.0/creating-beat-from-metricbeat.html](https://www.elastic.co/guide/en/beats/devguide/6.0/creating-beat-from-metricbeat.html)

Because the generated file `_meta/beat.yml` has some lines which includes "metricbeat", I edited it.  
But I noticed "make collect" overwrite the file and put the lines back "metricbeat."

My question is:

1. metricbeat/Makefile have a line `BEAT_NAME?=metricbeat`, is the file intended to be included from  
custom beat as well as used in metricbeat build?
2. (If 1. is NO,) Is it a good way to copy some targets (collect, configs, etc) from metricbeat/Makefile to custome one?

The sample beat repository : [https://github.com/shino/testbeat](https://github.com/shino/testbeat)  
The commit [https://github.com/shino/testbeat/commit/5de67519c77056a592ceaab6d644104296c584b0](https://github.com/shino/testbeat/commit/5de67519c77056a592ceaab6d644104296c584b0) is the one to be overwritten.

Thanks,  
Shino

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [November 21, 2017, 11:45pm UTC](https://discuss.elastic.co/t/make-collect-for-beat-based-on-metricbeat-overwrite-some-configs/108518/2 "2017-11-21T23:45:09Z")

</div>

You can overwrite the BEAT\_NAME but at the moment it still puts the config with metricbeat in. I wonder what @andrewkroh has some ideas here as he faces a similar challenge with auditbeat?

---

<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:** [December 19, 2017, 11:45pm UTC](https://discuss.elastic.co/t/make-collect-for-beat-based-on-metricbeat-overwrite-some-configs/108518/3 "2017-12-19T23:45:17Z")

</div>

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