This section describes how to collect Fluentd error messages (messages that are sent to the @ERROR label from another plugin in Fluentd).

Note: It depends on the specific plugin implementation what messages sent to the @ERROR label. A simple example is a parsing plugin that failes to parse a line and send that line to the @ERROR label.

Prerequisites 🔗︎

Configuring readiness probes requires Logging operator 3.14.0 or newer installed on the cluster.

Configure error output 🔗︎

To collect the error messages of Fluentd, complete the following steps.

  1. Create a ClusterOutput that receives logs from every logging flow where error happens. For example, create a file output. For details on creating outputs, see Output and ClusterOutput.

    apiVersion: logging.banzaicloud.io/v1beta1
    kind: ClusterOutput
    metadata:
      name: error-file
      namespace: default
        spec:
          file:
            path: /tmp/error.log
    
  2. Set the errorOutputRef in the Logging resource to your prefered ClusterOutput.

    apiVersion: logging.banzaicloud.io/v1beta1
    kind: Logging
    metadata:
      name: one-eye
    spec:
      controlNamespace: default
      enableRecreateWorkloadOnImmutableFieldChange: true
      errorOutputRef: error-file
      fluentbit:
        bufferStorage: {}
        bufferStorageVolume:
          hostPath:
            path: ""
        filterKubernetes: {}
    # rest of the resource is omitted
    

    You cannot apply filters for this specific error flow.

  3. Apply the ClusterOutput and Logging to your cluster.