Open cagucor opened 2 years ago
@SperChung-11 Could you please look at this issue, thank you :)
hi, @cagucor. you can try filebeat.yml config as follows :
filebeat.inputs:
- type: log
enabled: true
paths: /var/log/message
fields:
log_topic: warn_topic
include_lines: ['WARN']
- type: log
enabled: true
paths: /var/log/message
fields:
log_topic: info_topic
include_lines: ['INFO']
#--------------------------pulsar output ------------------------------
output.pulsar:
enabled: true
url: ${PULSAR_ADDRESS}
topic: '%{[fields.log_topic]}'
Hi, thanks for the reply.
I tried the solution you suggested, but it does not produce the expected result. When I use that config I get a topic called '%{[fields.log_topic]}'. Is dynamic topic a feature that is enabled? I noticed issue #19 is still open and has been in backlog for a while.
producerID=1 producer_name=filebeat topic="persistent://public/default/%{[fields.log_topic]}"
@Shoothzj can you help to confirm that if #19 was solved ? both are the same questions, thanks ^.^
Hi Everyone,
Is there a way to conditionally apply a topic to a certain message? For example: if an object has a field like level, then it will be published to a different topic if it is an info or warning.