# Elastic 7.4.2 metricbeat host.name is set to metricbeat agent.name on Centos 7.4

**URL:** <https://discuss.elastic.co/t/elastic-7-4-2-metricbeat-host-name-is-set-to-metricbeat-agent-name-on-centos-7-4/206579>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [November 5, 2019, 9:50am UTC](https://discuss.elastic.co/t/elastic-7-4-2-metricbeat-host-name-is-set-to-metricbeat-agent-name-on-centos-7-4/206579 "2019-11-05T09:50:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ionescu77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ionescu77/32/57525_2.png) [@ionescu77](https://discuss.elastic.co/u/ionescu77)\
**Post date:** [November 5, 2019, 9:50am UTC](https://discuss.elastic.co/t/elastic-7-4-2-metricbeat-host-name-is-set-to-metricbeat-agent-name-on-centos-7-4/206579/1 "2019-11-05T09:50:46Z")

</div>

In the Kibana Metricbeat Dashboard, I see the agent name instead of the hostname.

 ![03](https://us1.discourse-cdn.com/elastic/original/3X/a/b/ab8af67a7ffa3c4415de0b77e3f83a11d4ed4a58.png)

The metricbeat.yml is:

 ![26](https://us1.discourse-cdn.com/elastic/original/3X/0/0/00d06b8a4df1f09bb7863209f275cb9bdea7fce5.png)

This behaviour is annoying, because if I click in the dashboard on "System Overview" it will use the query:  
host.name = "[spaceport.avproiect.com](http://spaceport.avproiect.com)"  
and no data (does not work obviously because host.name is somehow set to agent.name)

 ![22](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b8e0afb3cb10259a27fc120df891ba6e0ea93a87.png)

I manually correct the query I can see the data

 ![37](https://us1.discourse-cdn.com/elastic/original/3X/3/c/3ce60a131a7d922cce0499f3bf2525d6865bc424.png)

I tried to edit this query markdown but it is just a link to a dashboardID I don't know.

:((((

 ![33](https://us1.discourse-cdn.com/elastic/original/3X/a/4/a4033a9621e46ab47317eabdecb5a1e410263c5a.png)

---

<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:** [November 11, 2019, 2:50pm UTC](https://discuss.elastic.co/t/elastic-7-4-2-metricbeat-host-name-is-set-to-metricbeat-agent-name-on-centos-7-4/206579/2 "2019-11-11T14:50:23Z")

</div>

Hello, sorry for the late response. Did you try running metricbeat without specifying the name of the shipper in `metricbeat.yml`? So under `General` session of your metricbeat.yml, it will look like:

```auto
#================================ General =====================================

# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:

# The tags of the shipper are included in their own field with each
# transaction published.
tags: ["spaceport", "avp"]

# Optional fields that you can specify to add additional information to the
# output.
fields:
  env: staging

```

Based on [documentation](https://www.elastic.co/guide/en/ecs/current/ecs-host.html) of `host.name` field:  
It can contain what `hostname` returns on Unix systems, the fully qualified domain name, or a name specified by the user. The sender decides which value to use.

---

<div class="post-metadata">

**Author:** ![ionescu77](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ionescu77/32/57525_2.png) [@ionescu77](https://discuss.elastic.co/u/ionescu77)\
**Post date:** [November 12, 2019, 9:12am UTC](https://discuss.elastic.co/t/elastic-7-4-2-metricbeat-host-name-is-set-to-metricbeat-agent-name-on-centos-7-4/206579/3 "2019-11-12T09:12:09Z")

</div>

Hello, yes indeed. When it agent name was left empty it will display the hostname in Kibana. However I wanted to be able to have both agent\_name and hostname in Kibana for visualisations.

---

<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 10, 2019, 9:12am UTC](https://discuss.elastic.co/t/elastic-7-4-2-metricbeat-host-name-is-set-to-metricbeat-agent-name-on-centos-7-4/206579/4 "2019-12-10T09:12:13Z")

</div>

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