Getting Data In

Splunk not breaking events correctly

shanleyj
Explorer

Hi

I'm forwarding logs into Splunk from a database trace file via monitor through a LWF.

Example file content is as follows:

Thu Sep 30 17:09:54 2010
Unix_process_pid=10218
LENGTH : '132'
ACTION :[7] 'CONNECT'
DATABASE USER:[1] '/' 
PRIVILEGE :[6] 'SYSDBA'    
CLIENT USER:[6] 'oracle' 
CLIENT TERMINAL:[0] ''
STATUS:[1] '0'

The props.conf contains the following:

[db_audit]
TIME_FORMAT = %a %b %d %H:%M:%S %Y
BREAK_ONLY_BEFORE_DATE = true
SHOULD_LINEMERGE = true

For some reason Splunk is not consistently breaking on date. I have tried using a REGEX instead of breaking on date. I have also re-arranged so that the line "Unix_process_pid" is the start of the event. The same inconsistent behaviour remains. Around 90% are correctly broken into events and the remainder are truncated. Examples:

Event
Thu Sep 30 17:09:54 2010
Unix_process_pid=10218
LENGTH : '132'
ACTION :[7] 'CONNECT'


Event
CLIENT USER:[6] 'oracle'
CLIENT TERMINAL:[0] ''
STATUS:[1] '0'

Splunk version is 4.1.1

Tags (2)
0 Karma

ziegfried
Influencer

I would suggest to use a LINE_BREAKER instead of line merging:

[db_audit]
TIME_FORMAT = %a %b %d %H:%M:%S %Y
SHOULD_LINEMERGE = false
LINE_BREAKER=([\r\n]+)\w+ \w+ \d{2} \d{2}:\d{2}:\d{2} \d{4}[\r\n]

And make sure the props.conf settings are on the indexer (when using an LWF).

0 Karma

shanleyj
Explorer

Thanks for the reply.

Unfortunately I'm still getting the same result.

On further inspection the script which outputs the data to the file prints each line individually. So although it takes milliseconds it looks like Splunk's tail on the file is consuming the data before the entire event has been printed to the file.

I've just tried this out by manually adding data to the file and it is breaking at random points.

Not sure what to do with that one...

0 Karma
Get Updates on the Splunk Community!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...