Hi,
How can I direct logs from different inputs (all same type: log) to different topics in my kafka cluster.
Thanks
N.
Hi,
How can I direct logs from different inputs (all same type: log) to different topics in my kafka cluster.
Thanks
N.
The topic can be set by referencing a variable topic: '%{[fields.topic]}'
. Or there is a more expressive syntax that can be used with topics
. See kafka output config.
Example 1:
filebeat.inputs:
- paths: [/web/*.log]
fields:
topic: web
output.kafka.topic: '%{[fields.topic]}'
Example 2:
filebeat.inputs:
- paths: [/web/*.log]
fields:
topic: web
output.kafka.topic: mydefault
output.kafka.topics:
- when.contains.source: web
topic: web
- when.contains.message: login
topic: authentication
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.