Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

How to parse a log file with multiple types of records?

$
0
0
I have a log file with multiple line patterns. Something like this: [name] [surname] [address] [phone] [birthdate] [lastlogin] [key] [value] [timestamp] [username] [url] [errcode] [srcip] [dstip] [field1] [field2] [field3] [field4] There are multiple types of records in this file and each record type must be dealt with differently. Each record has its own fields and they rarely overlap. I need to extract each field in each record and then process them. How could I do that? Should I write a regex for each record type? Where should I put these regexes? I've been searching for a solution, but didn't find anything. Thanks.

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>