Getting Data In

What is the best practice for parsing custom multiline logs?

gauravmishra15
Path Finder

Dear Splunk experts,

I am working on parsing multiline custom application logs where log represents multiple lines to process some cases with invariable pattern including case type, processing StartvTime, SQL statements(multiple), respective SQL statement response time and processing end time.

Please suggest the best practice to parse these kind of logs for field extraction.

Thanks

0 Karma
1 Solution

s2_splunk
Splunk Employee
Splunk Employee

There isn't really a best practice; it all depends on what your logs actually look like. Please review the documentation on line breaking and the default (but configurable) limits for event sizes etc. to learn how this works.
If you can't get Splunk to do the right thing, your best chance of getting help is to provide a log sample of what you are dealing with and the configuration you have unsuccessfully tried.
Hope this helps.

View solution in original post

renjith_nair
Legend

There are multiple ways to achieve this.

  1. Easiest and best method is to merge events : http://docs.splunk.com/Documentation/Splunk/6.2.2/Data/Indexmulti-lineevents

  2. If you have common fields, join the events with one of the commands (join,transaction,stats etc) . https://answers.splunk.com/answers/335149/how-do-get-the-combined-search-result.html

---
What goes around comes around. If it helps, hit it with Karma 🙂

s2_splunk
Splunk Employee
Splunk Employee

There isn't really a best practice; it all depends on what your logs actually look like. Please review the documentation on line breaking and the default (but configurable) limits for event sizes etc. to learn how this works.
If you can't get Splunk to do the right thing, your best chance of getting help is to provide a log sample of what you are dealing with and the configuration you have unsuccessfully tried.
Hope this helps.

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...

Index This | How many sevens are there between 1 and 100?

August 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...