# Metricbeat: configure (or reset) host.id

**URL:** https://discuss.elastic.co/t/metricbeat-configure-or-reset-host-id/274925
**Category:** Beats
**Tags:** elastic-stack-monitoring, metricbeat
**Created:** [June 3, 2021, 9:38pm UTC](https://discuss.elastic.co/t/metricbeat-configure-or-reset-host-id/274925 "2021-06-03T21:38:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![BradVido](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bradvido/32/741_2.png) [@BradVido](https://discuss.elastic.co/u/BradVido)
#### Post date: [June 3, 2021, 9:38pm UTC](https://discuss.elastic.co/t/metricbeat-configure-or-reset-host-id/274925/1 "2021-06-03T21:38:34Z")

</div>

We are using metricbeat to monitor logstash.

We have many logstash vm's that are sending the same `host.id` in their metricbeat data. I'm guessing this is related to the vm's being cloned from the same template.

How can I either manually change or reset the `host.id` field that is populated by metricbeat data.

---

<div class="post-metadata">

### Author: ![BradVido](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bradvido/32/741_2.png) [@BradVido](https://discuss.elastic.co/u/BradVido)
#### Post date: [June 7, 2021, 1:41pm UTC](https://discuss.elastic.co/t/metricbeat-configure-or-reset-host-id/274925/2 "2021-06-07T13:41:32Z")

</div>

Could someone point me in the right direction in the metricbeat code where I could determine what host.id is calculated from?

---

<div class="post-metadata">

### Author: ![simianhacker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simianhacker/32/3383_2.png) [@simianhacker](https://discuss.elastic.co/u/simianhacker)
#### Post date: [June 8, 2021, 3:58pm UTC](https://discuss.elastic.co/t/metricbeat-configure-or-reset-host-id/274925/3 "2021-06-08T15:58:23Z")

</div>

@BradVido Looks like this can be done by adding an `add_fields` processor to your `metricbeat.yml` config like this:

```auto
processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~
  - add_fields:
      target: host
      fields:
       id: 'whatever-id-you-want'

```

Also you can read more about this in the docs: [Add fields | Metricbeat Reference [7.13] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/current/add-fields.html)

---

<div class="post-metadata">

### Author: ![BradVido](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bradvido/32/741_2.png) [@BradVido](https://discuss.elastic.co/u/BradVido)
#### Post date: [June 8, 2021, 9:34pm UTC](https://discuss.elastic.co/t/metricbeat-configure-or-reset-host-id/274925/4 "2021-06-08T21:34:47Z")

</div>

@simianhacker thanks for the tip. That did work!

But I now realize that the actual field I need to update is the `logstash_stats.logstash.uuid` field, which is the same across two of my instances.

I found the solution here for anyone else with this problem [Logstash Monitoring API - - #2 by chrisronline](https://discuss.elastic.co/t/logstash-monitoring-api/213286/2)

---

<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: [July 6, 2021, 11:34pm UTC](https://discuss.elastic.co/t/metricbeat-configure-or-reset-host-id/274925/5 "2021-07-06T23:34:47Z")

</div>

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