filebeat.prospectors:
# Each - is a prospector. Most options can be set at the prospector level, so# you can use different prospectors for various configurations.# Below are the prospector specific configurations.
- type: log
# Change to true to enable this prospector configuration.
enabled: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /var/log/test1.log
#- c:\programdata\elasticsearch\logs\*
fields:
log_topics: test1
- type: log
enabled: true
paths:
- /var/log/test2.log
fields:
log_topics: test2
#----------------------------- kafka output --------------------------------
output.kafka:
# Boolean flag to enable or disable the output module.
enabled: true
# The list of Kafka broker addresses from where to fetch the cluster metadata.# The cluster metadata contain the actual Kafka brokers events are published# to.
hosts: [{{kafka_url}}]
# 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]}`.
topic: '%{[fields][log_topics]}'