Getting Data In

Timestamp extraction stops working on some lines and all future lines

johnansett
Communicator

Hello!

I have a log which has the following format:

12345|A123456/A12345678/some_thing|00:01:00|0|AA|a1234abc_aa_abc[123]|this is the message

If I set a time extraction of %T or %H:%M:%S it doesn't seem to work. If I leave it on auto it does work, but about 30 lines in it captures the whole beginning of the line and then changes the date.

The day month and year is extracted from the file name (in this case it is filename.21Feb19) and the first events have this correctly extracted but as soon as it reaches this line it fails. Further down in the file it also occurs.

Any ideas what's going on here?

Thanks!

0 Karma
1 Solution

woodcock
Esteemed Legend

Try this:

[<YourOriginalSourcetypeHere>]
TIME_PREFIX = ^([^|]*\|){2}
TIME_FORMAT = %H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 8

If you have overridden/overwritten the original sourcetype, USE THE ORIGINAL VALUE.
Deploy to the first full instance of Splunk that handles the events (HF or Indexer tier).
Restart all Splunk instances there.
Send in new events.
When validating use All time for your Timepicker and add _index_earliest=-5m to your search string to see only new events (old events will stay broken).

View solution in original post

woodcock
Esteemed Legend

Try this:

[<YourOriginalSourcetypeHere>]
TIME_PREFIX = ^([^|]*\|){2}
TIME_FORMAT = %H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 8

If you have overridden/overwritten the original sourcetype, USE THE ORIGINAL VALUE.
Deploy to the first full instance of Splunk that handles the events (HF or Indexer tier).
Restart all Splunk instances there.
Send in new events.
When validating use All time for your Timepicker and add _index_earliest=-5m to your search string to see only new events (old events will stay broken).

Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...