-
Notifications
You must be signed in to change notification settings - Fork 88
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
Always lowercase FQDN #180
Conversation
Do you think we should also ensure that the Hostname is normalized to lowercase? |
You'll need to add a changelog file as per https://github.com/elastic/go-sysinfo/blob/main/CONTRIBUTING.md. |
Probably. I'll add the change to this PR.
Thanks, didn't realize this repo now has a changelog - nice! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one more location to update at
go-sysinfo/providers/aix/host_aix_ppc64.go
Line 176 in 577dee5
h.info.Hostname = v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4561a7c
to
7ffcef0
Compare
Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
This PR reverts #180 `Host.FQDNWithContext()` and the deprecated `Host.FQDN()` now return the FQDN as is; it isn't lowercased anymore. This also affects `types.HostInfo#Hostname` which, when it's the FQDN, won't be lowercased. Complying with ECS for `host.name` and `host.hostname` (https://www.elastic.co/guide/en/ecs/current/ecs-host.html#field-host-name) should not be handled by go-sysinfo. The users of go-sysinfo should ensure compliance with ECS if necessary.
According to https://www.elastic.co/guide/en/ecs/current/ecs-host.html#field-host-name:
Accordingly, this PR ensures that the FQDN lookup always results in a lowercased FQDN.