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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...