Autodiscover with k8s labels

Hi
I am trying to use condition in filebeat autodiscover for kubernates labels and i get yaml error.
There is no error in yaml when checked in yamlint.
filbeat version : 6.8.3
es version : 6.8.3

apiVersion: v1
data:
  filebeat.yml: |-
    filebeat.autodiscover:
      providers:
        - type: kubernetes
          templates:
            - condition:
               -equals.kubernates.labels.app: logapp
              config:
                - type: docker
                  containers.ids:
                    - "${data.kubernetes.container.id}"

    processors:
      - drop_event.when:
          or:
          - equals:
              kubernates.namespace.name: "filebeat"

    setup.template.name: "filebeat-openshift-%{[beat.version]}"
    setup.template.pattern: "filebeat-openshift-%{[beat.version]}-*"
    setup.template.overwrite: true

    output.elasticsearch:
      hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}']
      index: "filebeat-openshift-%{[beat.version]}-%{+yyyy.MM.dd}"

I have added label
kubernetes.labels.app: logapp

to a pod and just want to get data for that pod using app label

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.