Read unstructured log file to extract certain values

Hi there,

I am newbie to logstash... trying to use to parse our dataloding log files, extraction certain values from the file and store it into a JSON formated out file. for example: below is a snippet of the text log file, where "...." refers to some other info i am not interested in. in this snippet i need to capture the following: how can i do this?

  1. "2" in 4th line which is # of records in xyz.zip file
  2. "2" that number loaded to temp
  3. "40" that number loaded to temp2

ignore all "...." text in between

/**** log file

No errors detected in compressed data of file/xyz.zip.
file/xyz is a valid zip file.
Total counts for this file is
2
....
....
2 records was loaded into the temp table
40 records was loaded into the temp2 table

*****/

Thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.