# Host.id is not unique

**URL:** <https://discuss.elastic.co/t/host-id-is-not-unique/196487>\
**Category:** Beats\
**Created:** [August 23, 2019, 10:02am UTC](https://discuss.elastic.co/t/host-id-is-not-unique/196487 "2019-08-23T10:02:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![navigator182](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navigator182/32/49980_2.png) [@navigator182](https://discuss.elastic.co/u/navigator182)\
**Post date:** [August 23, 2019, 10:02am UTC](https://discuss.elastic.co/t/host-id-is-not-unique/196487/1 "2019-08-23T10:02:11Z")

</div>

I am running auditbeat with more than 300 hosts, but there is 50 hosts showing at "[Visualize]Host Count [Auditbeat System] ECS". I find that the host.id is not unique. it's same on filebeat. How is it happened?[auditbeat001|422x500](https://discuss.elastic.co/uploads/short-url/syPu6OxcS43q6dRSPVfK3057nPq.png)  
p.s. the hostname looks like [vrs001.clive.ghxw.node.abcd.cn](http://vrs001.clive.ghxw.node.abcd.cn), [vpm001.mamvod.ghxw.node.abcd.cn](http://vpm001.mamvod.ghxw.node.abcd.cn) and so on

---

<div class="post-metadata">

**Author:** ![Michael\_Madden](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_madden/32/46640_2.png) [@Michael\_Madden](https://discuss.elastic.co/u/Michael_Madden)\
**Post date:** [September 3, 2019, 7:56pm UTC](https://discuss.elastic.co/t/host-id-is-not-unique/196487/2 "2019-09-03T19:56:09Z")

</div>

Hello,

Thanks for reaching out regarding auditbeat. All the beats read the contents of `/etc/machine-id`. Are these hosts possibly cloned from a template? If this is the case, you may need to regenerate the file.

The following article is a good source for updating `/etc/machine-id` on CentOS/RHEL 7.  
[https://www.thegeekdiary.com/centos-rhel-7-how-to-change-the-machine-id/](https://www.thegeekdiary.com/centos-rhel-7-how-to-change-the-machine-id/)

---

<div class="post-metadata">

**Author:** ![navigator182](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navigator182/32/49980_2.png) [@navigator182](https://discuss.elastic.co/u/navigator182)\
**Post date:** [September 5, 2019, 9:43am UTC](https://discuss.elastic.co/t/host-id-is-not-unique/196487/3 "2019-09-05T09:43:34Z")

</div>

Thanks for your reply. The OS is Centos6.6 and there is not the file /etc/machine-id.  
The version of beats is 7.2.0. The beats are intalled by rpm packages.

auditbeat-7.2.0-1.x86\_64.rpm  
filebeat-7.2.0-1.x86\_64.rpm

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [September 5, 2019, 2:47pm UTC](https://discuss.elastic.co/t/host-id-is-not-unique/196487/4 "2019-09-05T14:47:12Z")

</div>

Older OSes may have the machine-id stored in a different location.

> <https://github.com/elastic/go-sysinfo/blob/51d9d1362d77a4792dfb39a7a19f056cdf1b9840/providers/linux/machineid.go#L31-L33>

I think the file can be regenerated by removing it and running `dbus-uuidgen --ensure`.

---

<div class="post-metadata">

**Author:** ![navigator182](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navigator182/32/49980_2.png) [@navigator182](https://discuss.elastic.co/u/navigator182)\
**Post date:** [September 6, 2019, 2:39am UTC](https://discuss.elastic.co/t/host-id-is-not-unique/196487/5 "2019-09-06T02:39:55Z")

</div>

Got it. Thanks a lot.

---

<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:** [October 4, 2019, 4:45am UTC](https://discuss.elastic.co/t/host-id-is-not-unique/196487/6 "2019-10-04T04:45:20Z")

</div>

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