Hi, can you give me an example please how to send specific log to specific topic ?
For example:
{"message":"<191>1061: May 4 21:48:55: %SYS-7-USERLOG_DEBUG: Message from tty0(user id: ): asd","source":"192.168.0.17"} ===> ciscotopic1
{"message":"<189>1065: May 4 21:49:04: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback14, changed state to down","source":"192.168.0.17"} ====> ciscotopic2
I have the following config
<source>
@type udp
port 5140
bind 0.0.0.0
tag fluentd.syslog.cisco.udp
# Set 'source' as the field name for the message source
source_hostname_key source
# Using built-in 'none' parser which shoves the whole log into the message field
# and sets the timestamp to the time the message was received, see:
#
https://docs.fluentd.org/v1.0/articles/parser_none format none
</source>
<match fluentd.syslog.cisco.**>
@type kafka2
topic_key ciscotopic1
default_message_key '%LINK-5-CHANGED'
message_key_key '%LINK-5-CHANGED'
brokers kafka01:9092
default_topic ciscotopic
<format>
@type json
</format>
<buffer topic>
flush_interval 10s
</buffer>
</match>