<?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 Re: Timestamp Extraction in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-Extraction/m-p/85901#M17858</link>
    <description>&lt;P&gt;To grab the first time stamp:&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD will tell Splunk how far to look before identifying the timestamp.&lt;BR /&gt;
In other situations, you might use this to take the 2nd timestamp by setting MAX_TIMESTAMP_LOOKAHEAD = 40.&lt;/P&gt;

&lt;P&gt;If you would prefer to use LINE_BREAKER, you'll want to review this:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/Data/Indexmulti-lineevents"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/Data/Indexmulti-lineevents&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;LINE_BREAKER requires a capturing group that defines the newline and carriage returns. It's a little difficult to work with because you need to be sure that you account for the accurate pattern.&lt;/P&gt;

&lt;P&gt;You might want to try something like this:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
[log4j]&lt;BR /&gt;
BREAK_ONLY_BEFORE=\w{3}\s\w{3}\s\d{2}\s\d{4}\s\d{2}:\d{2}:\d{2}&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD=10&lt;BR /&gt;
NO_BINARY_CHECK=1&lt;BR /&gt;
SHOULD_LINEMERGE=true&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2013 14:56:54 GMT</pubDate>
    <dc:creator>rsennett_splunk</dc:creator>
    <dc:date>2013-04-05T14:56:54Z</dc:date>
    <item>
      <title>Timestamp Extraction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-Extraction/m-p/85900#M17857</link>
      <description>&lt;P&gt;I have a log with multiple lines that contains several timestamps. When monitoring the logs splunk is split them into several events , I just need to split on the first timestamp of the begining of the lines with a specific format without considered my log as several events:&lt;/P&gt;

&lt;P&gt;I have used &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; and &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; but this isn't help- maybe &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt; will help but don't know how to figure it out, MY TIME is only the begin of a newline.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;props.conf&lt;BR /&gt;
----------&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[log4j]&lt;BR /&gt;
NO_BINARY_CHECK = 1&lt;BR /&gt;
TIME_FORMAT = %a %b %e %Y %k:%M:%S,%3 %Z&lt;BR /&gt;
LINE_BREAKER = \w{3}\s\w{3}\s\d{2}\s\d{4}\s\d{2}:\d{2}:\d{2}&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;MYLOG:&lt;BR /&gt;
-------&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;EVENT1&amp;gt;&lt;BR /&gt;
Thu Feb 28 2013 08:58:39,024 EST ERROR .persistence.exceptions.DatabaseException&lt;BR /&gt;
Internal Exception: java.sql.SQL&lt;BR /&gt;
bind =&amp;gt; [SH90054, 2013-02-27 10:20:16.425, 2013-02-27 10:20:16.425, null, null, F, MD80828, null]&lt;BR /&gt;
Query: InsertObjectQuery()&lt;BR /&gt;
at org...&lt;BR /&gt;
&amp;lt;EVENT2&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;Thu Feb 28 2013 08:60:39,024 EST WARN XYZ&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2013 12:01:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-Extraction/m-p/85900#M17857</guid>
      <dc:creator>royimad</dc:creator>
      <dc:date>2013-04-05T12:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamp Extraction</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamp-Extraction/m-p/85901#M17858</link>
      <description>&lt;P&gt;To grab the first time stamp:&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD will tell Splunk how far to look before identifying the timestamp.&lt;BR /&gt;
In other situations, you might use this to take the 2nd timestamp by setting MAX_TIMESTAMP_LOOKAHEAD = 40.&lt;/P&gt;

&lt;P&gt;If you would prefer to use LINE_BREAKER, you'll want to review this:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/Data/Indexmulti-lineevents"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/Data/Indexmulti-lineevents&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;LINE_BREAKER requires a capturing group that defines the newline and carriage returns. It's a little difficult to work with because you need to be sure that you account for the accurate pattern.&lt;/P&gt;

&lt;P&gt;You might want to try something like this:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
[log4j]&lt;BR /&gt;
BREAK_ONLY_BEFORE=\w{3}\s\w{3}\s\d{2}\s\d{4}\s\d{2}:\d{2}:\d{2}&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD=10&lt;BR /&gt;
NO_BINARY_CHECK=1&lt;BR /&gt;
SHOULD_LINEMERGE=true&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2013 14:56:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamp-Extraction/m-p/85901#M17858</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2013-04-05T14:56:54Z</dc:date>
    </item>
  </channel>
</rss>

