How to export beat name instead of hostname for beat.name field


(Brandon Klise) #1

I apologize if this is a duplicate, but I was unable to find a solution.

For the beat.name field of my beat's output, it is using my hostname instead of the beat name:

"beat":{
    "hostname":"bklise",
    "name":"bklise"
},

I have the shipper name set in my configuration file:

shipper:
  name: "cassandrabeat"

yet it still outputs my hostname instead. Any suggestions on how to export my beat's name for the beat.name field?


(Jared Carey) #2

Which particular beat is this for?


(Brandon Klise) #3

It's a beat I made called cassandrabeat.


(Andrew Kroh) #5

What version of libbeat is cassandrabeat built upon? In 5.x (master branch) the config format has changed and name is no longer under shipper. See https://github.com/elastic/beats/blob/dff726c/libbeat/_meta/config.yml#L6


(Brandon Klise) #6

Cassandrabeat is built upon libbeat version 5.0.0-alpha4. After changing my config file to the new config format the beat name is appearing correctly.

Thanks


(Andrew Kroh) #7

(ruflin) #8

@bklise Glad it is working now. It would be nice if you could add cassandrabeat also to our community beats list: https://github.com/elastic/beats/blob/master/libbeat/docs/communitybeats.asciidoc In addition, it sounds like cassandrabeat could be a potential addition to metricbeat: https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-developer-guide.html