Getting Data In

How to fix the timestamp for multiline events?

senthilnathanv
Explorer

Hi, Kindly help me out with to solve this question

When I try to parse the log event data into splunk which is in the multiline format, the timestamp is not identified correctly by splunk. It shows error that it "failed to parse timestamp". how to resolve this issue.

My log will be looking like this:

201907231345267473.00
10-24-00 aaaa bbbbb cccccc

here date is 2019-07-23 and time is 10-24-00
But these two line are identified as single event by enabling SHOULD_LINEMERGE = true

0 Karma

jkat54
SplunkTrust
SplunkTrust

You can put this in datetime.xml in your app and deploy to first splunk enterprise instance in the input chain. I dont think its needed on the universal forwarder, but i forget if thats the truth or not.

<datetime>
  <define name="_custom_datestamp1" extract="year, month, day">
    <text><![CDATA[(?i\*\*)(\d{4})(\d{2})(\d{2})]]></text>
  </define>
  <define name="_custom_timestamp1" extract="hour, minute, second">
    <text><![CDATA[(?i)^(\d{2})-(\d{2})-(\d{2})]]></text>
  </define>
  <timePatterns>
    <use name="_custom_timestamp1"/>
  </timePatterns>
  <datePatterns>
    <use name="_custom_datestamp1"/>
  </datePatterns>
</datetime>

the changes will only apply to NEW data ingested after the datetime.xml is deployed.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

What are the props.conf settings for that sourcetype?

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...