Hi All,
I'm trying to configure kafka output based on two input location conditions, wherein I'm encountering the below error. Please advise !!
# ============================== Filebeat inputs ===============================
filebeat.inputs:
# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: log
# Change to true to enable this input configuration.
enabled: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /var/tmp1/*.log (line no 29)
fields:
type: pipeline1
- type: log
enabled: true
paths:
- /var/tmp2/*.log
fields:
type: pipeline2
#-------------------------------- Kafka Output --------------------------------
output.kafka:
# Boolean flag to enable or disable the output module.
enabled: true
# The list of Kafka broker addresses from which to fetch the cluster metadata.
# The cluster metadata contain the actual Kafka brokers events are published
# to.
hosts: ###########################################################
# The Kafka topic used for produced events. The setting can be a format string
# using any event field. To set the topic from document type use `%{[type]}`.
topics:
- topic: 'topic1'
when:
equals:
type: '%{[fields.type]}'
- topic: 'topic2'
when:
equals:
type: '%{[fields.topic]}'
Please shed some light on it. Thanks !!
Regards,
Clyton