Getting Data In

Recognizing timestamps split across multiple lines

MatMeredith
Path Finder

My event have separate date and time fields on separate lines. E.g.


Date: 29 April 2013

Time: 12:02:03.6

Is it possible to configure Splunk to automatically extract timestamps for these events, piecing together the date and time as necessary?

Many thanks!

Tags (1)
0 Karma
1 Solution

_d_
Splunk Employee
Splunk Employee

Not automatically. I would use datetime.xml here and define custom extractions.

View solution in original post

0 Karma

_d_
Splunk Employee
Splunk Employee

Not automatically. I would use datetime.xml here and define custom extractions.

0 Karma

MatMeredith
Path Finder

That's what I feared... Thanks!

0 Karma

kristian_kolb
Ultra Champion

Splunk is fairly good at interpreting timestamps by itself. You could try to index a log file and see how well it performs. Two things, though;

1) ensure that you have correct line_breaking, since splunk will normally break events when on the line where it encounters a timestamp. So if you have some lines before the timestamp that are part of the event, you may need to get explicit with some props.conf settings (either a SHOULD_LINEMERGE=true / MUST_BREAK.., BREAK_ONLY.. combo, or SHOULD_LINEMERGE=false / LINE_BREAKER combo. See the docs for props.conf for this.

2) You'll probably need to adjust the MAX_TIMESTAMP_LOOKAHEAD to a higher number than the default 150.

See this (and the following) page(s);

http://docs.splunk.com/Documentation/Splunk/latest/Data/HowSplunkextractstimestamps

Hope this helps,

Kristian

0 Karma

MatMeredith
Path Finder

Sadly this doesn't seem to work. Splunk cannot automatically figure out the separate date and time fields... Thanks though!

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...