Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify host.name vs. host.hostname #498

Closed
roncohen opened this issue Jul 8, 2019 · 13 comments
Closed

Clarify host.name vs. host.hostname #498

roncohen opened this issue Jul 8, 2019 · 13 comments

Comments

@roncohen
Copy link
Contributor

roncohen commented Jul 8, 2019

Following up from #62, it's unclear when to use host.name and when to use host.hostname. APM sends host.hostname while beats send host.name. This is what ECS was designed to fix, so it looks like we need to clarify when to use what and potentially remove one of them.

@roncohen
Copy link
Contributor Author

roncohen commented Jul 8, 2019

related: elastic/kibana#40486

@webmat
Copy link
Contributor

webmat commented Jul 8, 2019

The hostname of a machine should always be put in host.hostname. Beats is populating host.hostname, as far as I can tell. If you've seen a situation where that's not the case, please open an issue on the Beats repo.

host.name can contain the hostname by default, but it's meant to be a field people can override with a "better" identification for the host, if they have one (e.g. a cloud instance ID, an ID from their inventory management).

@webmat
Copy link
Contributor

webmat commented Jul 8, 2019

The descriptions for these fields kind of hint at this distinction, but it's probably not explicit enough. I'll make a note to clarify the relationship between these two fields.

@roncohen
Copy link
Contributor Author

roncohen commented Jul 8, 2019 via email

@webmat
Copy link
Contributor

webmat commented Jul 9, 2019

Standard use case should be: all events have both host.hostname and host.name filled with the same information, the hostname of the machine.

If someone's environment creates duplicate hostnames or if users want to override with the ID or name from their inventory asset management system, they need to modify host.name accordingly, and leave host.hostname intact.

This way, host.hostname can always be trusted to reflect whatever the reality is on that server, whereas host.name is more of a "true identity", adapted to the user's environment.

Accordingly, Elastic SIEM is using host.name to distinguish hosts from one another. It was seen as the best combination of precision, configurability and user-friendliness (vs host.id).

@webmat
Copy link
Contributor

webmat commented Jul 16, 2019

@roncohen Did the explanation above make sense? Can we close this issue?

@roncohen
Copy link
Contributor Author

roncohen commented Jul 17, 2019

OK, seems like we'd need to set both, allow users to override host.name and make all the UI use host.name?

@webmat
Copy link
Contributor

webmat commented Jul 17, 2019 via email

@roncohen
Copy link
Contributor Author

thanks!

@roncohen
Copy link
Contributor Author

there's still confusion about this. What can we do to clarify?

Ideas:

  • rename host.name to something that makes things more clear? host.friendly_name, host.display_name
  • retire host.name completely and ask people to use host.id if they want to give hosts a custom name?

@webmat
Copy link
Contributor

webmat commented Apr 22, 2020

Could you open a new issue detailing what the confusion is?

@johncollaros
Copy link

Comparing beats output in 7.6.2 release:
metricbeat, filebeat: host.name = host.hostname, which is the plain hostname of the machine.
winlogbeat: host.name != host.hostname; host.name = FQDN, host.hostname = plain hostname

This causes Kibana apps such as metric explorer to show two instances of the host.

It's not clear which field should be used, and the beats do not seem to use host.name field consistently.

@webmat
Copy link
Contributor

webmat commented Apr 28, 2020

@johncollaros ECS defines the schema, but doesn't take part in implementing it across all of our products. Please raise this issue with Beats.

@elastic elastic locked as resolved and limited conversation to collaborators Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants