Can fluent-bit handle very long messages generated...
# general
v
Can fluent-bit handle very long messages generated by containers in a kubernetes cluster? We can see that fluent-bit sets the logtag to "P" for cutoff logs and the log then continues in another message. This is our pipeline:
Copy code
inputs: |
      [INPUT]
          Name tail
          Path /var/log/containers/*.log
          Tag kube.*
          Parser cri
          Skip_Long_Lines Off
          Buffer_Chunk_Size 2M
          Buffer_Max_Size 20M
          DB /fluent-bit/var/tail-containerd.db
          Refresh_interval 10
          Threaded on
      [INPUT]
          Name tail
          Path /var/lib/rancher/rke2/agent/logs/kubelet.log
          Parser klog
          Skip_Long_Lines Off
          Buffer_Chunk_Size 2M
          Buffer_Max_Size 20M
          Path_Key filename
          Tag kube.rke2
          DB /fluent-bit/var/tail-kubelet.db
          Threaded on
      [INPUT]
          Name systemd
          Alias in_systemd
          Tag host.systemd
          Lowercase on
          Read_From_Tail On
          DB /fluent-bit/var/tail-systemd.db
          Threaded on

    ## https://docs.fluentbit.io/manual/pipeline/filters
    filters: |
      [FILTER]
          Name kubernetes
          Match kube.var.log.containers.*
          Merge_Log On
          K8S-Logging.Parser On
          K8S-Logging.Exclude Off
          Buffer_Size 256KB

      [FILTER]
          Name record_modifier
          Match *
          Record cluster_name ${ClusterName}

      [FILTER]
          Name modify
          Match kube.*
          Add fluent_pipeline kubernetes-input

      [FILTER]
          Name modify
          Match host.systemd
          Add fluent_pipeline systemd-input

      [FILTER]
          Name nest
          Match host.systemd
          Operation nest
          Wildcard _*
          Nest_under systemd
          Remove_prefix _

    outputs: |
      [OUTPUT]
          Name          forward
          Match         *
          Upstream      /fluent-bit/etc/conf/upstream.conf
          Retry_Limit   False
          Alias         out_main
p
That's not fluent bit, that's the kubelet with P meaning partial.
You want to use the multiline parser options for tail, the docs show a good default set for cri
And your buffers also need to be large enough
But yes, it should be able to handle it and recombine
v
Thanks Pat, i will look into it!
Check the multiline section