Add_host_metadata not collecting host details

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:

    • 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'

any updates

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?

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: ~
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'

@eMitch Hi i have updated my metricbeat.yml

What do the metricbeat logs have to say?

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