# "host.name" value ignored by metricbeat arbitrarily

**URL:** <https://discuss.elastic.co/t/host-name-value-ignored-by-metricbeat-arbitrarily/208675>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [November 20, 2019, 10:28am UTC](https://discuss.elastic.co/t/host-name-value-ignored-by-metricbeat-arbitrarily/208675 "2019-11-20T10:28:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brinckerkoff](https://avatars.discourse-cdn.com/v4/letter/b/9d8465/32.png) [@Brinckerkoff](https://discuss.elastic.co/u/Brinckerkoff)\
**Post date:** [November 20, 2019, 10:28am UTC](https://discuss.elastic.co/t/host-name-value-ignored-by-metricbeat-arbitrarily/208675/1 "2019-11-20T10:28:15Z")

</div>

Hi everyone,

I'm experiencing an unexpected behaviour from metricbeat in some hosts: despite specifying a "host.name" in the "name" field in the metricbeat.yml configuration file, the beat overwrites this value with the hostname of the host. We have several hosts configured exactly in the same way, the only difference between them is the specified host.name, so I don't understand why the same configuration does not behave in the same way in every host.

In kibana I can see that the field "host.name" is filled with the hostname rather than the value I assigned in the configuration.

The fragment of the configuration in which I specify the host.name:

```
metricbeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false

setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression

name: someName

```

All the hosts are CentOS 7.3, their specs are very similar. Does somebody know why does that happen?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![Kaiyan\_Sheng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kaiyan_sheng/32/38247_2.png) [@Kaiyan\_Sheng](https://discuss.elastic.co/u/Kaiyan_Sheng)\
**Post date:** [December 2, 2019, 10:56pm UTC](https://discuss.elastic.co/t/host-name-value-ignored-by-metricbeat-arbitrarily/208675/2 "2019-12-02T22:56:35Z")

</div>

Hi @Brinckerkoff, thanks for posting here. I couldn't reproduce it when I tried with `name: test` specified in `metricbeat.yml`. What module are you running?

---

<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 30, 2019, 10:56pm UTC](https://discuss.elastic.co/t/host-name-value-ignored-by-metricbeat-arbitrarily/208675/3 "2019-12-30T22:56:36Z")

</div>

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