# Custom beat based on metric doesn't run in the background when started via inet.d

**URL:** <https://discuss.elastic.co/t/custom-beat-based-on-metric-doesnt-run-in-the-background-when-started-via-inet-d/123215>\
**Category:** Beats\
**Tags:** beats-development\
**Created:** [March 9, 2018, 7:56am UTC](https://discuss.elastic.co/t/custom-beat-based-on-metric-doesnt-run-in-the-background-when-started-via-inet-d/123215 "2018-03-09T07:56:35Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![dcroonen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dcroonen/32/27450_2.png) [@dcroonen](https://discuss.elastic.co/u/dcroonen)\
**Post date:** [March 23, 2018, 2:25pm UTC](https://discuss.elastic.co/t/custom-beat-based-on-metric-doesnt-run-in-the-background-when-started-via-inet-d/123215/11 "2018-03-23T14:25:25Z")

</div>

Hi @ruflin

I think you can stop searching. The explanation can be found in [this](https://discuss.elastic.co/t/export-template-from-custom-beat-based-on-metricbeat/119250/6) topic.

To summarize the `init.d` script of my beat (as compiled with the make scripts provided in the beat library) uses the subcommand `config test` to test the config at startup, but as explained in the referenced topic the subcommands aren't available in custom generated beats because the generator doesn't take them into account.

As a workaround I modified the `/etc/init.d` startup script to use `-configtest` instead of `test config`. But anyway this is some kind of a bug. Or the subcommands need to be available in custom generated beats or the `inet.d` startup scripts need to use the 'old' parameters instead of the subcommands to test the configfile at startup.

Regards  
Davy

---

_[View the full topic](https://discuss.elastic.co/t/custom-beat-based-on-metric-doesnt-run-in-the-background-when-started-via-inet-d/123215)._
