<?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: line breaking partial success in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/line-breaking-partial-success/m-p/155274#M31549</link>
    <description>&lt;P&gt;If every line is a single event, you can do this very simply:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SHOULD_LINEMERGE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That is all that is needed. Do not set the &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; if every line is a single event.&lt;/P&gt;

&lt;P&gt;If your input has timestamps that are not always at the beginning of a line, then (as @woodcock points out), you need to parse out the timestamp. There are a variety of settings for this. For multi-line events, Splunk breaks to begin each event with a line containing a timestamp. If Splunk isn't parsing your timestamps properly, it can't break multi-line events properly. And even if your input is all single-line events, you do need to get the timestamp right, too!&lt;/P&gt;

&lt;P&gt;As @somesoni2 mentioned, samples of your data will help us help you.&lt;/P&gt;

&lt;P&gt;Finally - if you are collecting multiple log files with a single input stanza, that's great. But if the log files have different formats, you will need to treat them differently for parsing by using separate props.conf stanzas.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Aug 2015 16:51:27 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2015-08-05T16:51:27Z</dc:date>
    <item>
      <title>line breaking partial success</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/line-breaking-partial-success/m-p/155271#M31546</link>
      <description>&lt;P&gt;I'm trying to bring in some custom source log files and initially no line breaking was occurring so all of the events in each log file would arrive as 1 event.&lt;BR /&gt;
I wrote a line break based on each new record starting with a 7 digit date string.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SHOULD_LINEMERGE = false
LINE_BREAKER = ([\n\r]+)\d{7}\s+
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Once that took effect, any log files that strictly contained only contained lines starting with a 7 digit string parsed correctly. However any log files that anywhere in the file has a line not starting with a 7 digit string, the entire log file is still entered as 1 event. As all lines not starting with the 7 digit string should be treated as the data for the previous digit string I'm unsure why this is failing.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2015 14:12:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/line-breaking-partial-success/m-p/155271#M31546</guid>
      <dc:creator>jsmith_splunk</dc:creator>
      <dc:date>2015-08-05T14:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: line breaking partial success</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/line-breaking-partial-success/m-p/155272#M31547</link>
      <description>&lt;P&gt;Could you post some sample data , including both type of events, one starts with 7 digit string and one without it,&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2015 15:40:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/line-breaking-partial-success/m-p/155272#M31547</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-08-05T15:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: line breaking partial success</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/line-breaking-partial-success/m-p/155273#M31548</link>
      <description>&lt;P&gt;Generally the solution is to set your &lt;CODE&gt;timestamp&lt;/CODE&gt; and break there.  Do your events start with a timestamp?  Share a few sample events.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2015 16:22:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/line-breaking-partial-success/m-p/155273#M31548</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-05T16:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: line breaking partial success</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/line-breaking-partial-success/m-p/155274#M31549</link>
      <description>&lt;P&gt;If every line is a single event, you can do this very simply:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SHOULD_LINEMERGE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That is all that is needed. Do not set the &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; if every line is a single event.&lt;/P&gt;

&lt;P&gt;If your input has timestamps that are not always at the beginning of a line, then (as @woodcock points out), you need to parse out the timestamp. There are a variety of settings for this. For multi-line events, Splunk breaks to begin each event with a line containing a timestamp. If Splunk isn't parsing your timestamps properly, it can't break multi-line events properly. And even if your input is all single-line events, you do need to get the timestamp right, too!&lt;/P&gt;

&lt;P&gt;As @somesoni2 mentioned, samples of your data will help us help you.&lt;/P&gt;

&lt;P&gt;Finally - if you are collecting multiple log files with a single input stanza, that's great. But if the log files have different formats, you will need to treat them differently for parsing by using separate props.conf stanzas.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2015 16:51:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/line-breaking-partial-success/m-p/155274#M31549</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-08-05T16:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: line breaking partial success</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/line-breaking-partial-success/m-p/155275#M31550</link>
      <description>&lt;P&gt;Thanks all, I ended up resolving the issue by writing the following in props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
SHOULD_LINEMERGE = true
BREAK_ONLY_BEFORE = ^\d{7}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Aug 2015 17:40:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/line-breaking-partial-success/m-p/155275#M31550</guid>
      <dc:creator>jsmith_splunk</dc:creator>
      <dc:date>2015-08-05T17:40:14Z</dc:date>
    </item>
  </channel>
</rss>

