logdna-agent-v2 icon indicating copy to clipboard operation
logdna-agent-v2 copied to clipboard

Exclusion not working

Open stdmje opened this issue 2 years ago • 2 comments

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

stdmje avatar Oct 16 '23 15:10 stdmje

@stdmje try to separate label and namespace in value:

"namespace:some-namespace,label.app.kubernetes.io/name:some-label"

dkhokhlov avatar Oct 16 '23 15:10 dkhokhlov

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.

stdmje avatar Nov 23 '23 09:11 stdmje