Does somebody know how to parse single line from a file and parse it for different outputs? For example: input is a log file, outputs are elasticsearch indices with different templates. I need to parse every line and save it into the first index and some of files which has a promo code (like "?promo=wteaewfsthser") I need to put to another index. I think it's possible to use two logstash instances (correct me if I'm wrong please). But I want to know is it possible to use single instance of logstash and one configuration file?
Thanks for your response, but the problem within the document structure. For the output A I need IP, Date, HTTP Method, Request, Response code, Referrer. For the output B I need only Date, Referrer, and Promo.
I found that the clone filter is what I needed. But also I found that I cannot use conditions to determine either event is original or cloned. Here's my configuration file:
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.