As you have seen I work in mutiline. (Multiple lines in one document).
My goal is to extract only lines containing "#####".
I tried with the following filter : match => {"message" => "(?(?:^|\n).#####.(?:^\n|$))"}
But logstash sends me the whole document while I want only the line.
I succeeded. Thank you very much all.
I have just a last question, The structure of my logs is as follows :
10:00:17.307 Int 22000 ##### EI_COF_RCCAuto_v7 - 00f7029cddc0cf9f - RCCAUTO-0614304044- MAJ CFA suite 10:00:17.307_I_I_00f7029cddc0cf9f [07:48] func will be continued(0,0000000030c000c6) 10:00:17.307_M_I_00f7029cddc0cf9f [17:11] VQ 000000000478eca0 first available call: none, reason=(0)strategy 10:00:17.307_I_I_00f7029cddc0cf9f [09:04] <<<<<<<<<<<<suspend interp(JUMPING), func:CallStrategy timers:00001
Every hour it is a new document. For each document I would like to extract the time and put it in a timestamp variable.
Can you help me ?
The time is good but it just sends me a wrong date. I think this is normal because at the beginning of each line there is only the time and not the date. The date is at the very beginning of the document.
I would like to know if we can retrieve the date and put it in the @timestamp too. So that there is the right date and the right time also.
The header of my logs urs looks like this :
So I would like to retrieve the highlighted date and put it in all the timestamp of each document.
I don't know if that's possible.
ES stores the @timestamp in UTC. ES does not know that your time is already in UTC because it doesn't have Z (UTC timezone) designated at the end of the time, so it did the adjustment for you. That's why you see a different date.
Not sure if you can add Z at the end of 2017-03-24T09:01:54.541 to 2017-03-24T09:01:54.541Z on the source side. Otherwise, you will have to do this in Logstash. If neither works for you, you can always do it during query time.
Initially, I thought your log header was your full log. If you only have the time in your log, you will have to append the date to it along with the Z. You can do this in Logstash using mutate replace.
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.