Splunk Search

props.conf time_format for source

rlaan
Path Finder

Goal is to parse new events based on this source value into multiline events split each time a new date is encountered.

Currently the events are not splitting correctly based on the date, as well as the AM/PM not being discovered causing all of the morning and afternoon data to overlap in the first 12 hours of the _time field.


Time stamp from log
<31-Mar-2021 3:18:04 o'clock AM MDT> <Error> <Default>

[source::/fmw/product/.../servers/logs/domain-1.out]
SHOULD_LINEMERGE = true
BREAK_ONLY_BEFORE = <\d+-\w+
TIME_PREFIX = <
TIME_FORMAT = %d-%b-%Y %I:%M:%S o'clock %p %Z
MAX_TIMESTAMP_LOOKAHEAD = 40

[source::/fmw/product/.../servers/logs/domain-2.out]
SHOULD_LINEMERGE = true
BREAK_ONLY_BEFORE = <\d+-\w+
TIME_PREFIX = <
TIME_FORMAT = %d-%b-%Y %I:%M:%S o'clock %p %Z
MAX_TIMESTAMP_LOOKAHEAD = 40

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try these settings.  Perhaps most important is escaping the < in a regex.

SHOULD_LINEMERGE = false
TIME_PREFIX = \<
TIME_FORMAT = %d-%b-%Y %I:%M:%S o'clock %p %Z
MAX_TIMESTAMP_LOOKAHEAD = 40
LINE_BREAKER = ([\r\n]+)\<\d+-

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Try these settings.  Perhaps most important is escaping the < in a regex.

SHOULD_LINEMERGE = false
TIME_PREFIX = \<
TIME_FORMAT = %d-%b-%Y %I:%M:%S o'clock %p %Z
MAX_TIMESTAMP_LOOKAHEAD = 40
LINE_BREAKER = ([\r\n]+)\<\d+-

 

---
If this reply helps you, Karma would be appreciated.
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 ...