logdna / logdna-agent-v2

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

Exclusion not working #571

Open stdmje opened 1 year ago

stdmje commented 1 year 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 1 year ago

@stdmje try to separate label and namespace in value:

"namespace:some-namespace,label.app.kubernetes.io/name:some-label"
stdmje commented 1 year 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.