i have a file with data in the format as given below, i have tried several times to index it using logstash conf file but failed. Please help me how can i index in two cases:
1: all key value pairs
2: some key value pairs.
You will want to start with a file input that uses the multiline codec.
Try specifying pattern as EOE, and what as previous.
Use the kv filter plugin to extract the key-value pairs. You might need to use two kv filters, the first splitting your multiline on the linebreak, and the second one then reading the individual fields to split the actual key-value pairs.
I have tried doing something like this, but i think those "dash" lines aren't taken care of. Those dash lines are also in the input. is there any flaw in the code?
how do i stop multiline filter for not including the dash lines and EOE in previous line?
this entire data is indexed as one line. EOE ------------------------------- a=z c=l e=4
thanks Benny it worked. i have 1 more question.
i have a file with kv pairs in which startTime key has output in two formats one is in epoch(1553438267.250) and other in unix time format(2019-03-24T14:37:48.096Z),
how do i convert epoch format to unix format during parsing and then how do i create @timestamp index on startTime values?
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.