Can I have two option on the output module on Logstash (suppose Kafka module) and check if some criteria happen in filter section I should send data to one of the output modules:
for example :
filter {
if [1] in source:
smth
if [2] in source:
smth2
}
output {
if 1_in_source :
kafka {
topic : 1
}
if 2_in_source :
kafka {
topic: 2
}
You can certainly use conditionals in the output section, although if the only difference in the output is the topic it might be better to use a single output and a sprintf reference to the topic.
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.