logdna / logdna-agent-v2

The blazingly fast, resource efficient log collection client
https://logdna.com
MIT License
63 stars 46 forks source link

Exclusion not working #571

Open stdmje opened 10 months ago

stdmje commented 10 months ago

I am trying to include all logs from a specific namespace but excluding the pods with a label and is not working.

extraEnv:
  - name: LOGDNA_K8S_METADATA_LINE_INCLUSION
    value: namespace:vcluster-ihq-demos
  - name: LOGDNA_K8S_METADATA_LINE_EXCLUSION
    value: "label.vcluster.loft.sh/namespace:kube-system"

I can see all the logs from the pods of that namespace including the ones with that label.

Am i missing something?

Thanks for the help

dkhokhlov commented 10 months ago

@stdmje try to separate label and namespace in value:

"namespace:some-namespace,label.app.kubernetes.io/name:some-label"
stdmje commented 9 months ago

Hey @dkhokhlov sorry for the late reply.

I have tried different combinations with no luck. If i include the namespace in LOGDNA_K8S_METADATA_LINE_EXCLUSION it skips all the logs from containers in that namespace, and i only want to exclude some of them.