Splunk Search

Parsing of events with fixed pattern

ramprakash
Explorer

Hi,

I am using Splunk to parse a particular sets of logs since many years but recently i have started facing some issue. Very few of the events are getting merged instead of parsing as a separate event.

Consider below example

2020-05-04 16:45:47,122 [ INFO] [CMEPS_JMSMessengerInject-EnterpriseMessageListener-186] - s_proc_id=921844e5-8130-4f29-9418-5622d95dfeef s_comp_id=ARCHIVER s_seq_no=9 s_proc_dur=372 s_proc_outcome=success
2020-05-04 16:45:48,124 [ INFO] [CMEPS_JMSMessengerInject-EnterpriseMessageListener-186]

These two events should be segregated and should not be merged under any condition.

Could someone help me to provide correct props.conf for this sourcetype so that Splunk only starts event with this timestamp pattern ex(2020-05-04 16:45:47)

Regards,
Devang

0 Karma

richgalloway
SplunkTrust
SplunkTrust

One should never onboard a sourcetype without specific props.conf settings. Letting Splunk about the data is asking for problems and actually slows Splunk down. Every sourcetype should specify these six attributes:

TIME_PREFIX
TIME_FORMAT
MAX_TIMESTAMP_LOOKAHEAD
SHOULD_LINEMERGE
LINE_BREAKER
TRUNCATE

If the data is sent by a universal forwarder then you should also specify EVENT_BREAKER and EVENT_BREAKER_ENABLE = true in the forwarder's props.conf.

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

ramprakash
Explorer

Thank you so much for explaining about onboarding new sourcetype..so in present scenario which configuration you recommend, i just want my events to start with timestamp only with no merging of other timestamp event. Do I need to use breakonlybefore ?

Appreciate your response.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

You should not need BREAK_ONLY_BEFORE. Try these settings.

TIME_PREFIX = ^
TIME_FORMAT =  %Y-%m-%d %H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 19
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)
TRUNCATE = 10000
---
If this reply helps you, Karma would be appreciated.
0 Karma

richgalloway
SplunkTrust
SplunkTrust

What are the current props.conf settings for that sourcetype?

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

ramprakash
Explorer

There is no settings as of now.

From docs i understood that some changes in props.conf is required.

Could you please suggest.

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

🍂 Fall into November with a fresh lineup of Community Office Hours, Tech Talks, and Webinars we’ve ...

Transform your security operations with Splunk Enterprise Security

Hi Splunk Community, Splunk Platform has set a great foundation for your security operations. With the ...

Splunk Admins and App Developers | Earn a $35 gift card!

Splunk, in collaboration with ESG (Enterprise Strategy Group) by TechTarget, is excited to announce a ...