Getting Data In

How to configure Splunk to split logs from a single event?

rameshlpatel
Communicator

Hi,

In my prod env, I am logging sql log in files with below given format. but splunk are not able identify each log as single events, In my case its taking multiple logs line in single splunk event. I am also adding breakline at end of each logs but still it didnt work.

So here my question is how should i configure splunk to split each log line as different event?

Following 5 logs are splunk considering in single events line.

Id = 156388596 Logger_Level = 32 Information = STOP:UM_VEHICLE.get_dispatch Difference = 18 Date = 21-JUL-2014 Time = 05:07:50.217741000 Scope = NULL Action = Initialized Module = OCS User_Name = OCS Client_identifier = cmcdona6 Call_Stack = NULL Unit_Name = UM_VEHICLE.GET_DISPATCH Line_No = 0 Scn = 0
Id = 156388597 Logger_Level = 32 Information = START:UM_ROUTEORDER_CONFIRMATION.Get_Confirm Difference = 0 Date = 21-JUL-2014 Time = 05:07:50.227767000 Scope = NULL Action = Initialized Module = OCS User_Name = OCS Client_identifier = cthoma24 Call_Stack = NULL Unit_Name = UM_ROUTEORDER_CONFIRMATION.GET_CONFIRM Line_No = 0 Scn = 0
Id = 156388598 Logger_Level = 32 Information = STOP:UM_ROUTEORDER_CONFIRMATION.Get_Confirm
Difference = 29 Date = 21-JUL-2014 Time = 05:07:50.256505000 Scope = NULL Action = Initialized Module = OCS User_Name = OCS Client_identifier = cthoma24 Call_Stack = NULL Unit_Name = UM_ROUTEORDER_CONFIRMATION.GET_CONFIRM Line_No = 0 Scn = 0
Id = 156388599 Logger_Level = 32 Information = START:UM_ROUTEORDER_CONFIRMATION.Get_Confirm Difference = 0 Date = 21-JUL-2014 Time = 05:07:50.480626000 Scope = NULL Action = Initialized Module = OCS User_Name = OCS Client_identifier = dgooding Call_Stack = NULL Unit_Name = UM_ROUTEORDER_CONFIRMATION.GET_CONFIRM Line_No = 0 Scn = 0
Id = 156388600 Logger_Level = 32 Information = STOP:UM_ROUTEORDER_CONFIRMATION.Get_Confirm Difference = 31 Date = 21-JUL-2014 Time = 05:07:50.511849000 Scope = NULL Action = Initialized Module = OCS User_Name = OCS Client_identifier = dgooding Call_Stack = NULL Unit_Name = UM_ROUTEORDER_CONFIRMATION.GET_CONFIRM Line_No = 0 Scn = 0

Tags (3)
1 Solution

strive
Influencer

Assuming each line starts with Id =

You should define line breaker rule in your props.conf file, like

[my_stanza]
LINE_BREAKER=([\r\n]+)Id = \d+

Note: I am not good at regular expressions. Please check the regular expression and modify it accordingly.

View solution in original post

strive
Influencer

Assuming each line starts with Id =

You should define line breaker rule in your props.conf file, like

[my_stanza]
LINE_BREAKER=([\r\n]+)Id = \d+

Note: I am not good at regular expressions. Please check the regular expression and modify it accordingly.

strive
Influencer

Yes. You have to configure it indexer props.conf

0 Karma

rameshlpatel
Communicator

Thanks for you answer,So Should I configured this in indexer props.conf?

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...