Getting Data In

How to define a file input for my data?

JasonCarter80
Explorer

Our application has a very readable, but quite unindexable format. Currently, its coming in as multiple lines, which is making my search results a bear to deal with. The format looks like this:

Entering:
Client:ClientCompanyName
LoggedInUser:me@me.com
Class:SurveyDAO
Method:isAdminUser(me@me.com)
StartTime: 2015-01-30 00:54:44 678
Query:select adminFlag from Accounts where id= ? 
EndTime:2015-01-30 00:54:44 990

Anyone provide some help in defining a decent file input for that?

Tags (1)
0 Karma
1 Solution

jayannah
Builder

You need put configuration similar to below in props.conf against the sourcetype

                                   props.conf
                                   [sourcetype]
                                   SHOULD_LINEMERGE=TRUE
                                   BREAK_ONLY_BEFORE = Entering:
                                   TIME_FORMAT =  %Y-%m-%d %H:%M:%S %3N
                                   MAX_TIMESTAMP_LOOKAHEAD = 500
                                   TIME_PREFIX = StartTime:

Note: I have not tested it and it should work fine.

The above configure merges the multi lines event into single line and break the individual event at "Entering:"

View solution in original post

jayannah
Builder

You need put configuration similar to below in props.conf against the sourcetype

                                   props.conf
                                   [sourcetype]
                                   SHOULD_LINEMERGE=TRUE
                                   BREAK_ONLY_BEFORE = Entering:
                                   TIME_FORMAT =  %Y-%m-%d %H:%M:%S %3N
                                   MAX_TIMESTAMP_LOOKAHEAD = 500
                                   TIME_PREFIX = StartTime:

Note: I have not tested it and it should work fine.

The above configure merges the multi lines event into single line and break the individual event at "Entering:"

JasonCarter80
Explorer

Worked like a charm!!! Thanks!

0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...