Filebeat исключить kubernetes namespace

Filebeat работает как DaemonSet в kubernetes. Пытаюсь исключить некоторые namespace, такие как "kube-system" и "calico-system".

ConfigMap: filebeat.yml выглядит следующим образом. Что я делаю не так? С таким конфигом вообще ничего не записывается.

   - type: container
        - /var/log/containers/*.log
        - /var/log/containers/java.*
        - drop_event:
                    - kubernetes.namespace: "kube-system"
        - add_kubernetes_metadata:
            host: ${NODE_NAME}
            - logs_path:
                logs_path: "/var/log/containers/"

I can't read or write Russian so I used Google Translate to convert your post to English and have also replied in English. If I misunderstood something, I apologize.

What happens if you comment out the drop_event processor from your configuration? Do you record all events? If so, can you post one of the recorded events here please so we can look at the fields in it?

Order of processors is significant. The kubernetes.* metadata fields are added by the add_kubernetes_metadata processor. So you probably want to swap the order of the processors in your configuration so add_kubernetes_metadata comes before drop_event.


Shaunak i'm trying to exclude some namespaces, because it's takes disk space.

someone have correct config how to exclude namespaces?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.