<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Issue with timestamp extraction in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Issue-with-timestamp-extraction/m-p/386624#M69388</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I have used the below setting in props, but the first event is not able to extract the timestamp:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
SHOULD_LINEMERGE=false
NO_BINARY_CHECK=true
TIME_FORMAT=%m/%e/%Y %H:%M:%S %p
TIME_PREFIX=[\r\n]+
MAX_TIMESTAMP_LOOKAHEAD=50
LINE_BREAKER=([\r\n]+)(\/\/\s[\-]+\s\/\/)
BREAK_ONLY_BEFORE=([\r\n]+)(\/\/\s[\-]+\s\/\/)
TRUNCATE=0
SEDCMD-EXTRALINES=s/\/\/\s[\-]+\s\/\///g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Event Sample &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;6/12/2019 4:12:40 AM (6/12/2019 8:12:40 AM) LogLevel=Information
Process_ID=6175, Thread.Thread_ID=8588 Thread.Thread_Name=()
Message=c
Extended Properties
Origin=hxhdgjshjs
TrackingToken=1c1fb75e-jdhhdd-jdhjdhd

// ----------- //
6/12/2019 4:13:40 AM (6/12/2019 8:13:40 AM) LogLevel=Information
Process_ID=6175, Thread.Thread_ID=85883 Thread.Thread_Name=()
Message=c
Extended Properties
Origin=hxhdgjshjs
TrackingToken=1c1fb75e-jdhhdd-jdhjdhd

// ----------- //
6/12/2019 4:14:40 AM (6/12/2019 8:14:40 AM) LogLevel=Information
Process_ID=6175, Thread.Thread_ID=85488 Thread.Thread_Name=()
Message=c
Extended Properties
Origin=hxhdgjshjs
TrackingToken=1c1fb75e-jdhhdd-jdhjdhd

// ----------- //
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also I don't want to use SHOULD_LINEMERGE=true. Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jul 2019 10:10:34 GMT</pubDate>
    <dc:creator>vishaltaneja070</dc:creator>
    <dc:date>2019-07-12T10:10:34Z</dc:date>
    <item>
      <title>Issue with timestamp extraction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issue-with-timestamp-extraction/m-p/386624#M69388</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I have used the below setting in props, but the first event is not able to extract the timestamp:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
SHOULD_LINEMERGE=false
NO_BINARY_CHECK=true
TIME_FORMAT=%m/%e/%Y %H:%M:%S %p
TIME_PREFIX=[\r\n]+
MAX_TIMESTAMP_LOOKAHEAD=50
LINE_BREAKER=([\r\n]+)(\/\/\s[\-]+\s\/\/)
BREAK_ONLY_BEFORE=([\r\n]+)(\/\/\s[\-]+\s\/\/)
TRUNCATE=0
SEDCMD-EXTRALINES=s/\/\/\s[\-]+\s\/\///g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Event Sample &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;6/12/2019 4:12:40 AM (6/12/2019 8:12:40 AM) LogLevel=Information
Process_ID=6175, Thread.Thread_ID=8588 Thread.Thread_Name=()
Message=c
Extended Properties
Origin=hxhdgjshjs
TrackingToken=1c1fb75e-jdhhdd-jdhjdhd

// ----------- //
6/12/2019 4:13:40 AM (6/12/2019 8:13:40 AM) LogLevel=Information
Process_ID=6175, Thread.Thread_ID=85883 Thread.Thread_Name=()
Message=c
Extended Properties
Origin=hxhdgjshjs
TrackingToken=1c1fb75e-jdhhdd-jdhjdhd

// ----------- //
6/12/2019 4:14:40 AM (6/12/2019 8:14:40 AM) LogLevel=Information
Process_ID=6175, Thread.Thread_ID=85488 Thread.Thread_Name=()
Message=c
Extended Properties
Origin=hxhdgjshjs
TrackingToken=1c1fb75e-jdhhdd-jdhjdhd

// ----------- //
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also I don't want to use SHOULD_LINEMERGE=true. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 10:10:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issue-with-timestamp-extraction/m-p/386624#M69388</guid>
      <dc:creator>vishaltaneja070</dc:creator>
      <dc:date>2019-07-12T10:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with timestamp extraction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issue-with-timestamp-extraction/m-p/386625#M69389</link>
      <description>&lt;P&gt;Try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX=^
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;since timestamp is at the start of line.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 10:27:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issue-with-timestamp-extraction/m-p/386625#M69389</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2019-07-12T10:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with timestamp extraction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issue-with-timestamp-extraction/m-p/386626#M69390</link>
      <description>&lt;P&gt;I would probably do something like this, which should start each event at the timestamp.  of course, you can use sed to get rid of the line separators if you don't want them&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
LINE_BREAKER = ([\r\n]+)(?=\d+\/\d+\/\d+\s+\d+:\d+:\d+)
TIME_PREFIX = ^
TIME_FORMAT = %m/%d/%Y %H:%M:%S %p
MAX_TIMESTAMP_LOOKAHEAD = 24
SHOULD_LINEMERGE = false
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Jul 2019 10:28:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issue-with-timestamp-extraction/m-p/386626#M69390</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2019-07-12T10:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with timestamp extraction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issue-with-timestamp-extraction/m-p/386627#M69391</link>
      <description>&lt;P&gt;The problem is that the &lt;CODE&gt;SEDCMD&lt;/CODE&gt; is removing the lines that you are depending on and need for &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt;.  You do not need the &lt;CODE&gt;SEDCMD&lt;/CODE&gt; because the &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; will remove them.  Also, I am not sure what will happen when your &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; has multiple capture groups so I would use this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[&amp;lt;Your Sourcetype Here - YOU MUST SET THIS&amp;gt;]
SHOULD_LINEMERGE=false
LINE_BREAKER=([\r\n\s]+\/\/\s+[\-]+\s+\/\/[\r\n\s]*)
NO_BINARY_CHECK=true
TIME_PREFIX=^
TIME_FORMAT=%m/%d/%Y %H:%M:%S %p
MAX_TIMESTAMP_LOOKAHEAD=22
TRUNCATE=999999
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you are doing a sourcetype override/overwrite, you must use the &lt;EM&gt;ORIGINAL&lt;/EM&gt; value, &lt;EM&gt;NOT&lt;/EM&gt; the new value, then you must deploy this to the first full instance(s) of Splunk that handles the events (usually either the HF tier, if you use one, or else your Indexer tier), restart all Splunk instances there, send in new events (old events will stay broken), then test using &lt;CODE&gt;_index_earliest=-5m&lt;/CODE&gt; to be absolutely certain that you are only examining the newly indexed events.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2019 17:10:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issue-with-timestamp-extraction/m-p/386627#M69391</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-13T17:10:23Z</dc:date>
    </item>
  </channel>
</rss>

