-
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 metadata for Kubernetes logs #12790
Report host metadata for Kubernetes logs #12790
Conversation
Filebeat was not reporting host metadata in the default Kubernetes manifest, this change gives Filebeat access to the hostNetwork to retrieve localhost metadata. `add_host_metadata` is added to gather it.
Wondering if we should go this way or just report |
kubernetes node info is partly managed by the cloud controller manager. iirc for AWS kubernetes would return the FQDN, it is up to cloud providers to fill the node information (including IPs) with whatever information they find relevant. That said, I think the kubernetes API contains all data needed to correlate with other non kubernetes events if needed. Also, I haven't looked at how beats retrieve node info but Node Status contains some of the info you mention above. Without having a strong opinion, as a user I would like to have the kubernetes API info to avoid multi-sources, but I wouldn't put the info into Is this kind of overlapping something we have faced before? |
That's a fair point, if we use different codepaths between Metricbeat and Filebeat we could end up with different values -> problems.
I see some benefits from extracting all host metadata from Kubernetes, that link looks promising. For instance, Filebeat should not need to have access to the host network just to retrieve the hostname.
We had situations like this, for instance,
I'm currently leaning towards the approach on this PR, for some reasons:
This should not stop any other research we can do in the future to revisit how metadata is added. WDYT? |
fully agree |
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.
SGTM if that's so to CI
* Report host metadata for Kubernetes logs Filebeat was not reporting host metadata in the default Kubernetes manifest, this change gives Filebeat access to the hostNetwork to retrieve localhost metadata. `add_host_metadata` is added to gather it. (cherry picked from commit fe18c0c)
…13027) * Report host metadata for Kubernetes logs (#12790) * Report host metadata for Kubernetes logs Filebeat was not reporting host metadata in the default Kubernetes manifest, this change gives Filebeat access to the hostNetwork to retrieve localhost metadata. `add_host_metadata` is added to gather it. (cherry picked from commit fe18c0c)
… logs (elastic#13027) * Report host metadata for Kubernetes logs (elastic#12790) * Report host metadata for Kubernetes logs Filebeat was not reporting host metadata in the default Kubernetes manifest, this change gives Filebeat access to the hostNetwork to retrieve localhost metadata. `add_host_metadata` is added to gather it. (cherry picked from commit dbbe30b)
Filebeat was not reporting host metadata in the default Kubernetes manifest,
this change gives Filebeat access to the hostNetwork to retrieve
localhost metadata.
add_host_metadata
is added to gather it.After this change
host
metadata should be present in logs, which will make it easier to correlate them with host metrics.