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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...