-
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
Not always send host.name
and have host metadata processor enabled
#10698
Comments
With aligning fields to meet ECS criteria it became clear that a beat can act as an agent , observer or both when handling an event.
When acting as an agent enriching the event with meta information related to the agent itself might make sense, e.g. adding In situations where the beat acts as observer for an event, enriching it with this information does not make sense and can even be misleading, as the host info should concern the host where the event is created or measured (as defined by ECS). Right now we introduced cc @urso @andrewkroh |
Pinging @elastic/uptime |
Having read @simitt Thinking about this more, I think, for heartbeat at least, the best answer is to stick with Also salient to us is the notion of a |
Here's an idea: - add_host_metadata:
target: [root|agent|observer] |
@andrewvc I see the need for you to have your monitored endpoint IPs in a field that makes more sense than src/dst or cli/srv. At this point I'm not sure yet ECS should cover that, I'd need to see other use cases for it. For now, you can simply keep track of it in your events in a custom field. I would try to avoid a generic nesting such as A place that would be safer for Heartbeat to have custom fields would be WDYT? No stress if it's too late to adjust to this idea for 7.0. Let's deal with conflicts only if they materialize. |
@webmat I think for 7.0 the best thing we can do is just remove the host metadata for now. I spoke to @ruflin about this, and the conclusion was that most people don't use this data now. In the meantime users can manually edit the config to add in extra metadata if need be, and it will make adding the right fields later easier. That said, in terms of what to do ultimately, are saying that all non-ECS fields should be under |
Not necessarily. I'd say it depends on the situation. Some situations have a very low risk of conflict, or a very high risk of getting into ECS as is (#10760 is an example of the latter situation). In situations like this, I think it's fine to mix fields directly inside the ECS field space. In many other situations (e.g. if one needs a whole field set space named like a general concept, like |
Coming up with a good documentation page on how to think about integrating custom fields in an ECS index is very high in my mind. |
Closing the loop here for heartbeat, we wound up using |
Yes, we still need the issue to solve it in "all" Beats. |
We got too many open issues for this same issue :) I did lay out a plan for handling this in #13920. I will follow up to create a meta-issue + per-task issue. I think we can close this one. |
Closing in favor of #13920 Newest one wins 😆 |
Beats always sets the field
host.name
: https://github.com/elastic/beats/blob/master/libbeat/publisher/pipeline/module.go#L88 The reason this was introduce was to have always host data available as an object. Also theadd_host_metadata
processor is enabled in the default config. This make sense as long as the Beats collect data locally. But in cases likeheartbeat
,apm-server
where the event is initiated on a different machine, having thehost.name
of the local machine does not make too much sense. Also if metricbeat fetches metrics from a remote host, thehost.*
data should be populate with the info from this host and not the host metricbeat is running on.In the above cases, instead of being the agent, the role of the Beats is the
observer
: https://github.com/elastic/ecs#-observer-fieldsTo allow more flexibility, libbeat should stop populating
host.name
always. In addition a beat / event should be configurable if it's an agent on an observer. For the host metadata processor, it could be decided based on the role if the host metadata should be enriched or not.Metricbeat or Filebeat can have different roles based on the input. If Filebeat reads data from a file, it's the agent, if it opens a syslog input, it becomes an observer.
The text was updated successfully, but these errors were encountered: