Beat.hostname & values

Elastic search shows events posted by my beat with following values in beat.* fields:
beat.hostname hostname hostname
beat.version 7.0.0-alpha1
I guess, this is due to beat.go code.
What would be the easiest way to have show beat.Info.Beat (i.e. "my beat name")?

The value in is a custom user-defined name. It's supposed to be changed by operators to identify a machine the data come from.
Your beats name is published at least via @metadata. Users integration beats with Logstash, normally use the @metadata fields, so to generate the same index names for example.

The name setting overwrite

What is the purpose of beat.hostname then?

That’s all I see it in Elasticsearch:
@timestamp May 8th 2018, 0:00:00.000
t _id 100000001
t _index test-7.0.0-alpha1-2018.05.08
# _score -
t _type doc
t beat.hostname hostname
t hostname
t beat.version 7.0.0-alpha1
# id 100,000,001
Do I have to add it manually?

May I have an example, please?

The name setting overwrite

May I have an example, please?

Adding this to your config file:

name: abc

will give you:

|@timestamp|May 8th 2018, 0:00:00.000|
|t _id|100000001|
|t _index|test-7.0.0-alpha1-2018.05.08|
|# _score|-|
|t _type|doc|
|t beat.hostname|hostname|
|t beat.version|7.0.0-alpha1|
|# id|100,000,001|

The hostname can not be changed and is only the hostname (not the FQDN). For users running multiple beats one the same host (indexing into the same index) or having a setup with machines having the same hostname (but with different domain name), the name setting adds some more filtering capabilities.

I’ve seen beat.go code. I tried with testbeat. Neither
name: abc
name: "abc"
works in test.yml.
Did I do it wrong?

It's a global setting, no indentation required. All libbeat settings are available in the config.reference.yml. When running make update, the beats local <beatname>/_meta/config.yml and <beatname>_meta/config.reference.yml are concatenated with the<>.yml files.

Worked like a charm!

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