Getting Data In

Ingesting event data with timestamps afterwards sometimes

Thomas-R
New Member

Hey All,

 

I have data that needs to be ingested with multiple lines similar to the following:

************ Start Display Current Environment ************

***data***

***data***

***data***

************* End Display Current Environment *************

[13/11/21 5:21:15:183 AEDT] 00000001 ***data***
[13/11/21 5:21:15:276 AEDT] 00000001 ***data***
[13/11/21 5:21:15:278 AEDT] 00000001 ***data***

************ Start Display Current Environment ************

***data***

***data***

***data***

************* End Display Current Environment *************

[17/11/21 5:21:15:183 AEDT] 00000001 ***data***
[17/11/21 5:21:15:276 AEDT] 00000001 ***data***
[17/11/21 5:21:15:278 AEDT] 00000001 ***data***

 

Please note that the Start and End Display current Environment lines are constant in length and how they start but belong to the timestamp after themselves.

Is there a way to parse this data?

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try these props.conf settings:

[mysourcetype]
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)\*{12} Start
TIME_PREFIX = \[
TIME_FORMAT = %d/%m/%y %H:%M:%S:%$N %Z
---
If this reply helps you, Karma would be appreciated.
0 Karma

Thomas-R
New Member

Hi @richgalloway,

I tried that but unfortunately it groups the events as per '************ Start' but sometimes the events start with the date instead, it there a way to sometimes get it to parse if this '************ Start' is first unless there is a date there instead?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Thanks for clarifying the requirements.  Try this setting.

LINE_BREAKER = ([\r\n]+)(\*{12} Start|\[\d\d\/)
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...