-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Report host name as FQDN on all platforms #1070
Comments
+1 |
+1, running topbeat on my linux hosts returns FQDN, but running topbeat on windows hosts (Server 2012R2) only returns the hostname. Would like to have it normalized. |
my linux systems (cent 7.2) report fqdn, but my windows report the shortname. I would prefer the shortname (which is how my rsyslog data comes in). can we update this request to allow you to specificy the command used to aquire the hostname? windows: |
Please make this an option, I for one prefer the shortname as it keeps the field length shorter. Some windows domains have really long FQDNs. |
it might be preferable to allow running a custom command to determine hostname. on some systems even |
A good idea, too but hostname -f shows the short version only if the system is wrongly setup (or didnt have a domain) |
How can i force this ? We need fqdn |
@mib4fun, we replaced filebeat.prospectors:
- input_type: log
fields_under_root: true
fields:
host: "fqdn" |
Also you can define |
@popstas ! Its' working ! |
Found this report while trying to figure out how to do the opposite... I only want the hostname part available in a field, not the entire fqdn. I.e. what hostname -s returns. Having two fields, one with just the hostname and one with the fqdn, would be a fine solution for me. Reasons:
|
This is really an issue. The inconsistencies in I can understand that it takes some time to update beats host.name output and processors etc, but at least we should asap evolve to a consensus where this is going long-term, so we can make the necessary preparations and if time permits even add the domain ourselves untill Elastic provides it. @MorrieAtElastic @andrewkroh @webmat @MikePaquette Please think about a long term plan for |
Agreed, there's a few things we'd like to shore up with regards to host identifiers. I'll make sure fqdn vs shortname is part of the discussion. |
hi there, |
@webmat Any news about this? |
On the ECS side we've just started a more holistic discussion around all the host identifiers, it's RFC 0006. Still very early stage, though. Should start moving in the coming weeks. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still an issue :( |
+1 |
@joshdover thanks for the ping. Since this proposal looks to be about a forward-looking convention rather than a forced migration, I don't envision significant issues on our end. As others have mentioned, we primarily use
We'll probably want to communicate this change to Security users so that they can respond accordingly, but this will always be specific to the user's data and their consumption of it. |
@ferullo, I ensure you are in the loop about @joshdover's proposal. @mitodrummer has started a PR here to move this along. Any concerns? |
No, I have no concerns. Endpoint can align with Agent/Beats on this, we'll just need to know the exact release to make the change in. The only part of the Security App that I can think of that could be affected by this is Endpoint or Detection Engine rules and I really really doubt any Elastic rules are based on |
folks, a question about the domain. Depending on the system configuration the domain might be missing, thus the FQDN would be just the hostname. On Linux Any objections on that? |
@AndersonQ What about Windows, will it take the workgroup as domain? I don't see a problem with using .lan for Linux servers not in a domain. |
As Josh recommended on 8.x it'll be optional, thus a config is required, therefore I propose:
|
Thanks for sharing, @AndersonQ. A couple questions:
|
I don't foresee any problem, as long as we add it to the "policy parser", it should be fine. But I'll confirm with the team later today.
I'd say the agent would configure the |
I think the issue is that Agent v2 removed all knowledge and assumptions about the underlying streams configuration. AFAIK we don't manipulate it anymore. However, I think we want to have consistent behavior across all integrations (@nimarezainia please confirm). Once we have the shipper appending these fields, this is more straightforward, but until then we need another solution. Please do discuss with the team today (I won't be there). |
@AndersonQ Please keep us posted in order to take a decision today. |
After discussing with the team, we agreed on having a feature flag config The generic version is:
That way the agent will be able to enable and disable features and the features can have complex configs beyond just enable/disabled |
Thanks @AndersonQ for the update. Feel free to link Beats and Agent PR to this issue in order to consider this as complete. |
@AndersonQ Great thank you. Let's make sure this field is explicitly documented in the control protocol, along with the expected behavior of the application. We should then share that elastic-agent-client PR with the Endpoint developers as soon it's available for them to start integrating with. |
One question: does this mean that we are only planning to support this feature in Agent or do we still plan to add a Beats configuration for this? |
I have no objections to this approach to adding a default domain when needed. Also this config looks good to me, please just make sure it's passed to Endpoint over the v2 comms. @softengchick is going to take over tracking this issue from the Endpoint side. |
Anderson can you run your test on a Mac ? I’m pretty sure the default expected domain would be .local |
done. We'll mimic as much as possible the OS behaviour |
No, the complete behaviour is described on elastic/go-sysinfo#144. For windows, as we can request the FQDN directly to the system, it just returns what we get. |
Apparently Go does not provide the FQDN on all systems (particularly Linux, it seems) because it checks
/bin/hostname
rather than/bin/hostname -f
.Here's the Go test showing that they accept the shortname: https://golang.org/src/os/os_test.go#L1341
It would be great if we could fill in the actual FQDN rather than an unexpected subset, but it does mean providing an appropriate mechanism for every supported system (or falling back to the subpar behavior that comes out of the box).
As a workaround, #715 will allow environment variables to fill this in, but it still requires something else in the environment to be used.
/cc @andrewkroh
The text was updated successfully, but these errors were encountered: