# Override host.name for remote modules

**URL:** <https://discuss.elastic.co/t/override-host-name-for-remote-modules/216421>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 24, 2020, 1:03pm UTC](https://discuss.elastic.co/t/override-host-name-for-remote-modules/216421 "2020-01-24T13:03:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![decibel83](https://avatars.discourse-cdn.com/v4/letter/d/7feea3/32.png) [@decibel83](https://discuss.elastic.co/u/decibel83)\
**Post date:** [January 24, 2020, 1:03pm UTC](https://discuss.elastic.co/t/override-host-name-for-remote-modules/216421/1 "2020-01-24T13:03:34Z")

</div>

I am configuring Metricbeat to fetch some stats from a remote HAProxy server.  
This way HAProxy metrics are sent to Elasticsearch with the `host.name` of the local Metricbeat server and not of the `host.name` from the remote HAProxy server.

I am wondering if I can override the host.name or host.hostname variables so that:

- system metrics are forwarded with the `host.name` of the local Metricbeat host
- HAProxy metrics are formwarded with the `host.name` of the remote HAProxy server, configuring it somewhere

Thanks!

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [January 24, 2020, 3:38pm UTC](https://discuss.elastic.co/t/override-host-name-for-remote-modules/216421/2 "2020-01-24T15:38:05Z")

</div>

Maybe you can use a processor to set the target server:

[https://www.elastic.co/guide/en/beats/metricbeat/current/add-fields.html](https://www.elastic.co/guide/en/beats/metricbeat/current/add-fields.html)

---

<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 21, 2020, 3:51pm UTC](https://discuss.elastic.co/t/override-host-name-for-remote-modules/216421/3 "2020-02-21T15:51:22Z")

</div>

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