# Changes of hostname or ip addresses does not updates host metadata until metricbeat restart on nodes

**URL:** https://discuss.elastic.co/t/changes-of-hostname-or-ip-addresses-does-not-updates-host-metadata-until-metricbeat-restart-on-nodes/226403
**Category:** Beats
**Tags:** metricbeat
**Created:** [April 3, 2020, 12:42pm UTC](https://discuss.elastic.co/t/changes-of-hostname-or-ip-addresses-does-not-updates-host-metadata-until-metricbeat-restart-on-nodes/226403 "2020-04-03T12:42:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mmelyp](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mmelyp](https://discuss.elastic.co/u/mmelyp)
#### Post date: [April 3, 2020, 12:42pm UTC](https://discuss.elastic.co/t/changes-of-hostname-or-ip-addresses-does-not-updates-host-metadata-until-metricbeat-restart-on-nodes/226403/1 "2020-04-03T12:42:51Z")

</div>

Hi there,

I have an issue here with metricbeat.

I found out that if I change the hostname of my debian nodes (hostnamectl set-hostname FQDN), or if i add or remove IP addresses, i always have to restart metricbeat in order to receive the host metadata updated.

Is this a bug, or it is simply this use case not implemented?

Greetings and thanks in advance. Great product by the way.

---

<div class="post-metadata">

### Author: ![ChrsMark](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrsmark/32/55858_2.png) [@ChrsMark](https://discuss.elastic.co/u/ChrsMark)
#### Post date: [April 3, 2020, 3:20pm UTC](https://discuss.elastic.co/t/changes-of-hostname-or-ip-addresses-does-not-updates-host-metadata-until-metricbeat-restart-on-nodes/226403/2 "2020-04-03T15:20:42Z")

</div>

Hey!

I think that this should have to do with the caching of the metadata. Please check `cache.ttl` of the config options: [https://www.elastic.co/guide/en/beats/metricbeat/current/add-host-metadata.html](https://www.elastic.co/guide/en/beats/metricbeat/current/add-host-metadata.html)

C.

---

<div class="post-metadata">

### Author: ![mmelyp](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mmelyp](https://discuss.elastic.co/u/mmelyp)
#### Post date: [April 3, 2020, 3:39pm UTC](https://discuss.elastic.co/t/changes-of-hostname-or-ip-addresses-does-not-updates-host-metadata-until-metricbeat-restart-on-nodes/226403/3 "2020-04-03T15:39:12Z")

</div>

You are right!

I overlooked the cache.ttl setting at metricbeat.yml.

Thank you very much. Issue solved.

Greetings and stay safe!

---

<div class="post-metadata">

### Author: ![mmelyp](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mmelyp](https://discuss.elastic.co/u/mmelyp)
#### Post date: [April 3, 2020, 3:53pm UTC](https://discuss.elastic.co/t/changes-of-hostname-or-ip-addresses-does-not-updates-host-metadata-until-metricbeat-restart-on-nodes/226403/4 "2020-04-03T15:53:24Z")

</div>

By the way, would be nice to have also the IP addresses in CIDR notation or with a separate netmask field.

---

<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: [May 1, 2020, 3:56pm UTC](https://discuss.elastic.co/t/changes-of-hostname-or-ip-addresses-does-not-updates-host-metadata-until-metricbeat-restart-on-nodes/226403/5 "2020-05-01T15:56:23Z")

</div>

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