elastic / beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
https://www.elastic.co/products/beats
Other
103 stars 4.92k forks source link

defaultLogPath of add_kubernetes_metadata may be removed #37141

Open flyingrx opened 1 year ago

flyingrx commented 1 year ago

Describe the enhancement: After version 1.23, Kubernetes uses containerd instead of Docker as the container runtime interface (CRI). However, I noticed that the default log path "/var/lib/docker/containers/" is still being used in the code, even though it can be replaced by user configuration. This is further complicated by the fact that the recommended deployment YAML file for Filebeat in the document mounts "/var/lib/docker/containers/" to the container.

Describe a specific use case for the enhancement or feature: the code path: /beats/filebeat/processor/add_kubernetes_metadata/matchers.go

func defaultLogPath() string {
    if runtime.GOOS == "windows" {
        return "C:\\ProgramData\\Docker\\containers"
    }
    return "/var/lib/docker/containers/"
}

document URL: https://www.elastic.co/guide/en/beats/filebeat/current/running-on-kubernetes.html

To download the manifest file, run:

curl -L -O https://raw.githubusercontent.com/elastic/beats/8.11/deploy/kubernetes/filebeat-kubernetes.yaml
botelastic[bot] commented 1 year ago

This issue doesn't have a Team:<team> label.

botelastic[bot] commented 2 days ago

Hi! We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!