openshift / cluster-logging-operator

Operator to support logging subsystem of OpenShift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cluster logging 5.6.0 breaks log forwarding with loki

theSuess opened this issue · comments

Describe the bug
After upgrading to 5.6.0, cluster log forwarding no longer works when using the default output in combination with loki

Environment

  • OCP 4.11, cluster-logging 5.6.0
apiVersion: logging.openshift.io/v1
kind: ClusterLogForwarder
metadata:
  name: instance
  namespace: openshift-logging
spec:
  inputs: []
  outputs:
    - name: fluentbit
      type: fluentdForward
      url: 'tcp://fluentbit.custom-logging.svc.cluster.local:24224'
  pipelines:
    - inputRefs:
        - audit
      name: audit-logs
      outputRefs:
        - fluentbit
      parse: json
    - inputRefs:
        - application
      name: application-logs
      outputRefs:
        - fluentbit
        - default

Expected behavior
The logs are forwarded to loki and fluentbit alike

Actual behavior
The configuration fails because of unrecognized outputs: ["default"]

To Reproduce
Steps to reproduce the behavior:

  1. Configure Loki as log storage
  2. use the provided ClusterLogForwarder
  3. Observe the failure

Additional context

I assume the issue stems from #1731. Reading the code, the way to go would be specifying an empty output of type Loki, but this is only supported for the Elasticsearch output.

Our current workaround is to specify the default output manually

#1824 is also related but it only fixes the issue for elasticsearch and not loki