# Add\_host\_metadata not collecting host details

**URL:** <https://discuss.elastic.co/t/add-host-metadata-not-collecting-host-details/338053>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [July 11, 2023, 4:31am UTC](https://discuss.elastic.co/t/add-host-metadata-not-collecting-host-details/338053 "2023-07-11T04:31:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijay\_kaali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay_kaali/32/59998_2.png) [@vijay\_kaali](https://discuss.elastic.co/u/vijay_kaali)\
**Post date:** [July 11, 2023, 4:31am UTC](https://discuss.elastic.co/t/add-host-metadata-not-collecting-host-details/338053/1 "2023-07-11T04:31:41Z")

</div>

Hi

i am using 6.8 metricbeat and server is 7.12 .  
a. add host metricset and got error , so enable add\_host\_metadata : ~  
b . as per documentation . add\_host\_metadata it should collect  
"host":{  
"architecture":"x86\_64",  
"name":"example-host",  
"id":"",  
"os":{  
"family":"darwin",  
"build":"16G1212",  
"platform":"darwin",  
"version":"10.12.6",  
"name":"Mac OS X"  
},

but it is not collecting any host /os fields host.architecture and os.build details  
what command it is using internally or is there any known bugs

metricbeat.yml

fields\_under\_root: true  
fields:  
Tier: "Linux"  
LongDescription: "Linux Server"  
Location: "xxx"  
ShortHost: "**"  
OSPlatform: "**"  
tags: ["service-x", "server","rhel"]  
metricbeat.max\_start\_delay: 10s  
metricbeat.modules:

- module: system  
period: 30s  
metricsets:

- module: system  
period: 10m  
metricsets:

- module: system  
period: 15m  
metricsets:

#### Kafka output =====================================

output.kafka:  
hosts: ["x.x.x.x:9092"]  
topic: 'Metricbeat'

---

<div class="post-metadata">

**Author:** ![vijay\_kaali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay_kaali/32/59998_2.png) [@vijay\_kaali](https://discuss.elastic.co/u/vijay_kaali)\
**Post date:** [July 13, 2023, 12:02pm UTC](https://discuss.elastic.co/t/add-host-metadata-not-collecting-host-details/338053/2 "2023-07-13T12:02:28Z")

</div>

any updates

---

<div class="post-metadata">

**Author:** ![eMitch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emitch/32/93607_2.png) [@eMitch](https://discuss.elastic.co/u/eMitch)\
**Post date:** [July 13, 2023, 2:16pm UTC](https://discuss.elastic.co/t/add-host-metadata-not-collecting-host-details/338053/3 "2023-07-13T14:16:51Z")

</div>

the formatting of the post makes it hard to read exactly what the yml configuration will look like.  
can you verify that `add_host_metadata` is properly under the `processors:` section?  
something like this?

```auto
metricbeat.modules:
- module: system
  xpack.enabled: true
  period: 30s
  metricsets: 
    - stats
    - cpu # CPU usage
    - load # CPU load averages
    - memory # Memory usage
    - process # Per process metrics
  enabled: true
  processes: ['.*']
  cpu.metrics: ["percentages", "normalized_percentages"]
  core.metrics: ["percentages"]
  process.include_top_n.enabled : true
  process.include_top_n.by_cpu : 10
  process.include_top_n.by_memory : 10
  processors:
    - add_host_metadata:
        cache.ttl: 30m
    - add_locale: ~

```

---

<div class="post-metadata">

**Author:** ![vijay\_kaali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay_kaali/32/59998_2.png) [@vijay\_kaali](https://discuss.elastic.co/u/vijay_kaali)\
**Post date:** [July 14, 2023, 9:02am UTC](https://discuss.elastic.co/t/add-host-metadata-not-collecting-host-details/338053/4 "2023-07-14T09:02:13Z")

</div>

```auto
fields_under_root: true
fields:
Tier: "Linux"
LongDescription: "Linux Server"
Location: "xxx"
ShortHost: ""
OSPlatform: ""
tags: ["service-x", "server","rhel"]
metricbeat.max_start_delay: 10s
metricbeat.modules:

module: system
period: 30s
metricsets:

cpu # CPU usage
load # CPU load averages
memory # Memory usage
process # Per process metrics
enabled: true
processes: ['.*']
cpu.metrics: ["percentages", "normalized_percentages"]
core.metrics: ["percentages"]
process.include_top_n.enabled : true
process.include_top_n.by_cpu : 10
process.include_top_n.by_memory : 10
processors:
add_host_metadata:
cache.ttl: 30m
add_locale: ~
module: system
period: 10m
metricsets:

filesystem
processors:
drop_event.when.regexp:
system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)'
module: system
period: 15m
metricsets:

uptime
Kafka output =====================================
output.kafka:
hosts: ["x.x.x.x:9092"]
topic: 'Metricbeat'

```

---

<div class="post-metadata">

**Author:** ![vijay\_kaali](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vijay_kaali/32/59998_2.png) [@vijay\_kaali](https://discuss.elastic.co/u/vijay_kaali)\
**Post date:** [July 15, 2023, 1:14am UTC](https://discuss.elastic.co/t/add-host-metadata-not-collecting-host-details/338053/5 "2023-07-15T01:14:39Z")

</div>

@eMitch Hi i have updated my metricbeat.yml

---

<div class="post-metadata">

**Author:** ![eMitch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emitch/32/93607_2.png) [@eMitch](https://discuss.elastic.co/u/eMitch)\
**Post date:** [July 18, 2023, 2:24pm UTC](https://discuss.elastic.co/t/add-host-metadata-not-collecting-host-details/338053/6 "2023-07-18T14:24:54Z")

</div>

What do the metricbeat logs have to say?

---

<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:** [August 15, 2023, 4:25pm UTC](https://discuss.elastic.co/t/add-host-metadata-not-collecting-host-details/338053/7 "2023-08-15T16:25:09Z")

</div>

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