Fluent Bit Filter for by PODs (calico-pod) in kubernetes?

2,439 views
Skip to first unread message

JWeb Dev

unread,
Feb 19, 2019, 5:30:35 AM2/19/19
to Fluent-Bit
Hi, I installed fluentbit with default settings. I like that the fluent bit adds additional information (the name of the container). 

But he writes in the index everything. How do I do better? How to add a filter so that it takes all the logs, except for example the logs from the calico pod.

Here is the default Filter.

    fluent-bit-filter.conf:
   
[FILTER]
       
Name                kubernetes
       
Match               kube.*
       
Kube_URL            https://kubernetes.default.svc:443
       
Kube_CA_File        /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
       
Kube_Token_File     /var/run/secrets/kubernetes.io/serviceaccount/token
       
Merge_Log           On
        K8S
-Logging.Parser  On
        K8S
-Logging.Exclude On



Thanks.

Don Bowman

unread,
Feb 19, 2019, 10:44:20 AM2/19/19
to JWeb Dev, Fluent-Bit
see the annotations section of https://docs.fluentbit.io/manual/filter/kubernetes is the simplest:


add that on calico pod will achieve your goal.

you can also do it by regex or glob on the match. The syntax of the 'tag' is kube.NAMESPACE.POD, so you could .e.g only log 'kube.PRODUCTION' if you wanted.

or kube.(PRODUCTION|DEVELOPMENT|APP|DATABASE)


--
You received this message because you are subscribed to the Google Groups "Fluent-Bit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluent-bit+...@googlegroups.com.
To post to this group, send email to fluen...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fluent-bit/4c1ea816-4fa0-4287-97a2-ab46302cb3a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages