Kafka metricbeat config

Hi,
I use metricbeat collecting kafka metrics, i want to filter data when kafka.partition.partition.leader not equals kafka.partition.partition.replica,

metricbeat.modules:

module: kafka
name: "kafka"
metricsets: ["consumergroup", "partition"]
period: 10s
hosts: ["********"]
enabled: true
processors:
drop_event.when.not.equals:
kafka.partition.partition.leader: kafka.partition.partition.replica

How do I configure it?

Hi @InspurKelly and welcome :slight_smile:

It is not possible to use fields as values for conditions.
For your case I guess that you want to drop events if they are not from leader partitions, in that case you may find useful a new field kafka.partition.partition.is_leader that we have added and will be available in 6.5.

ok,Thanks for your reply