Filebeat topics with 'when' conditions

Hi there,

I have the below defined in my output.kafka section

    topics:
      - topic: "my-topic"
        when:
          and:
              - equals:
                kubernetes.namespace: "test"
              - has_fields: ["someField"]

I get an error with my config
Exiting: error initializing publisher: missing or invalid condition

I then tested just the "has_fields" condition, i.e.

    topics:
      - topic: "my-topic"
        when:
              has_fields: ["someField"]

And this works perfectly. Does has_fields not work in conjunction with "and"? If it does, what am I doing wrong?

Thanks

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