Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-5879

splunk.index validation failed when use template syntax

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Critical Critical
    • None
    • Logging 6.0.0
    • Log Collection
    • False
    • None
    • False
    • NEW
    • OBSDA-550 - Updated APIs for Logging 6.0
    • NEW
    • Release Note Not Required
    • Log Collection - Sprint 257

      Description of problem:

      1. clusterlogforwarders.observability.openshift.io "to-splunk" was not valid:
      2. * spec.outputs[0].splunk.index: Invalid value: ".log_type": spec.outputs[0].splunk.index in body should match '^(([a-zA-Z0-9-_.\/])({(\.[a-zA-Z0-9_]|\."[^"]")((||)(\.[a-zA-Z0-9_]|\.?"[^"]"))||"[^"]"}))*$'
        #
      apiVersion: observability.openshift.io/v1
      kind: ClusterLogForwarder
      metadata:
        creationTimestamp: "2024-07-24T13:15:28Z"
        generation: 3
        name: to-splunk
        namespace: e2e-test-vector-splunk-lvjbh
        resourceVersion: "306985"
        uid: 6187f56c-b064-4f30-815b-88195b04d148
      spec:
        managementState: Managed
        outputs:
        - name: splunk-aosqe
          splunk:
            authentication:
              token:
                key: hecToken
                secretName: to-splunk-secret-68303
            index: '{{.log_type}}'
            url: http://splunk-http-0.e2e-test-vector-splunk-lvjbh.svc:8088
          type: splunk
      
      

      How reproducible:

      Always

      Steps to Reproduce:

      1. use template syntax as splunk.index
      2. ...

      Actual results:

      clusterlogforwarders.observability.openshift.io "to-splunk" was not valid:

      1. * spec.outputs[0].splunk.index: Invalid value: ".log_type": spec.outputs[0].splunk.index in body should match '^(([a-zA-Z0-9-_.\/])({(\.[a-zA-Z0-9_]|\."[^"]")((||)(\.[a-zA-Z0-9_]|\.?"[^"]"))||"[^"]"}))*$'
        #

      Expected results:

      index support template syntax to allow dynamic per-event values.

      Additional info:

            Unassigned Unassigned
            rhn-support-anli Anping Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: