-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add_kubernetes_metadata needs to respect logs_path setting #28629
Comments
Pinging @elastic/integrations (Team:Integrations) |
The Currently only Under
Under
So we need a way to extract the pod_uid from different log paths. But the constraint is that we need to know for each one of them where we can get the pod uid from the |
After discussing this issue with @MichaelKatsoulis and @ChrsMark , sum up:
|
Suppose you have this setting in filebeat.yml.
Then you have mounted container logs in the given path
/var/log/pods/
, but add_kubernetes_metadata can not find the match.2021-10-21T16:41:48.474Z DEBUG [kubernetes] add_kubernetes_metadata/matchers.go:88 Incoming log.file.path value: /var/log/pods/openshift-xxxx-logging_mdsd-xxxxxxx/fluentbit/0.log 2021-10-21T16:41:48.474Z DEBUG [kubernetes] add_kubernetes_metadata/kubernetes.go:210 No container match string, not adding kubernetes data {"libbeat.processor": "add_kubernetes_metadata"}
Because the code expects the path to be the static value
/var/lib/kubelet/pods/
We should use the passed value in
logs_path
in the code to be more flexible.The text was updated successfully, but these errors were encountered: