<?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: Why is Splunk not breaking each log line into single events? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374872#M67906</link>
    <description>&lt;P&gt;And did you restart the splunk instance after making the change(assuming it was place at right instance)?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Feb 2018 21:20:34 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2018-02-13T21:20:34Z</dc:date>
    <item>
      <title>Why is Splunk not breaking each log line into single events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374868#M67902</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;After being loaded into Splunk, my event looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVENT BEGINNING
[3c58db35-1eef-43a5-8b57-57081bec264c]   Rendered layouts/partials/_analytics.html.erb (10.5ms)
[3c58db35-1eef-43a5-8b57-57081bec264c]   Rendered meta/components/_header_mobile.html.erb (0.4ms)
[3c58db35-1eef-43a5-8b57-57081bec264c]   Rendered meta/components/_menu_mobile.html.erb (4.5ms)
[dd61c495-caf3-4d07-bfb5-8421c8ade35b]   Rendered layouts/partials/_google_tag_manager.html.erb (0.1ms)
EVENT END
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My event ID's are enclosed between square brackets. As you can see within the same event I have multiple logfile lines. That's a problem because when I try to filter by using 'transaction', multiple transactions id's are mixed together (in the above example 3c58db35-1eef-43a5-8b57-57081bec264c and dd61c495-caf3-4d07-bfb5-8421c8ade35b).&lt;BR /&gt;
Instead, I would like to have a single line per event so that It would be possible to correctly filter out transactions ids. Like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVENT BEGINNING
[3c58db35-1eef-43a5-8b57-57081bec264c]   Rendered layouts/partials/_analytics.html.erb (10.5ms)
EVENT END

EVENT BEGINNING
[3c58db35-1eef-43a5-8b57-57081bec264c]   Rendered meta/components/_header_mobile.html.erb (0.4ms)
EVENT END

EVENT BEGINNING
[3c58db35-1eef-43a5-8b57-57081bec264c]   Rendered meta/components/_menu_mobile.html.erb (4.5ms)
EVENT END

EVENT BEGINNING
[dd61c495-caf3-4d07-bfb5-8421c8ade35b]   Rendered layouts/partials/_google_tag_manager.html.erb (0.1ms)
EVENT END
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Shouldn't Splunk, by Default, split lines right after each \r\n ? (that's the LINE_BREAKER default value). Somehow instead, for reasons that I don't understand, Splunk is grouping lines that are unrelated to one another. &lt;/P&gt;

&lt;P&gt;Thank you for your help&lt;/P&gt;

&lt;P&gt;Alain&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 19:31:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374868#M67902</guid>
      <dc:creator>aa123s</dc:creator>
      <dc:date>2018-02-13T19:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not breaking each log line into single events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374869#M67903</link>
      <description>&lt;P&gt;I'm guessing you don't have any event parsing configuraton for your sourcetype. The default LINE_BREAKER is &lt;CODE&gt;[\r\n]+&lt;/CODE&gt; but that only defines the &lt;CODE&gt;line breaking&lt;/CODE&gt;. There are other attributes which define the &lt;CODE&gt;line merging&lt;/CODE&gt; and default values of other attributes are causing this merge of line into single events. See the below link for more details on how Splunk breaks the events.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.0.2/Data/Configureeventlinebreaking"&gt;https://docs.splunk.com/Documentation/Splunk/7.0.2/Data/Configureeventlinebreaking&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I would suggest, for better indexing performance, to explicitly define the event parsing rules for your sourcetypes, which is done on props.conf on Indexer or Intermediate/Heavy forwarders (Splunk Enterprise instance acting as forwarder) whichever comes first in the data flow. A sample configuration based on your sample events could be this (assuming you need current time as _time for your events as your events don't have timestamp in them)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YourSourceTypeHere]
LINE_BREAKER = ([\r\n]+)(?=\[\w+)
SHOULD_LINEMERGE =false
DATETIME_CONFIG = CURRENT
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Feb 2018 20:55:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374869#M67903</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-02-13T20:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not breaking each log line into single events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374870#M67904</link>
      <description>&lt;P&gt;Apologies for not specifying it in the first place, but I did already test (and now retested) your suggestion without success.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 21:07:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374870#M67904</guid>
      <dc:creator>aa123s</dc:creator>
      <dc:date>2018-02-13T21:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not breaking each log line into single events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374871#M67905</link>
      <description>&lt;P&gt;Did you place the configuration on the search head, indexer, heavy forwarder, universal forwarder, or...?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 21:15:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374871#M67905</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-13T21:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not breaking each log line into single events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374872#M67906</link>
      <description>&lt;P&gt;And did you restart the splunk instance after making the change(assuming it was place at right instance)?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 21:20:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374872#M67906</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-02-13T21:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not breaking each log line into single events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374873#M67907</link>
      <description>&lt;P&gt;I added the configuration into the local/props.conf of a universal forwarder. Said universal forwarder is the only one that writes to the particular sourcetype that I am using for testing.&lt;BR /&gt;
The splunkd was duly restarted each time&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 21:27:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374873#M67907</guid>
      <dc:creator>aa123s</dc:creator>
      <dc:date>2018-02-13T21:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not breaking each log line into single events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374874#M67908</link>
      <description>&lt;P&gt;I believe this is how to dump my running configuration. (My stanza is named unicorn:legacy)&lt;/P&gt;

&lt;P&gt;./bin/splunk cmd btool props list unicorn&lt;BR /&gt;
[unicorn:legacy]&lt;BR /&gt;
ANNOTATE_PUNCT = True&lt;BR /&gt;
AUTO_KV_JSON = true&lt;BR /&gt;
BREAK_ONLY_BEFORE =&lt;BR /&gt;
BREAK_ONLY_BEFORE_DATE = False&lt;BR /&gt;
CHARSET = UTF-8&lt;BR /&gt;
DATETIME_CONFIG = current&lt;BR /&gt;
HEADER_MODE =&lt;BR /&gt;
LEARN_SOURCETYPE = true&lt;BR /&gt;
LINE_BREAKER = ([\r\n]+)(?=[\w+)&lt;BR /&gt;
LINE_BREAKER_LOOKBEHIND = 100&lt;BR /&gt;
MAX_DAYS_AGO = 2000&lt;BR /&gt;
MAX_DAYS_HENCE = 2&lt;BR /&gt;
MAX_DIFF_SECS_AGO = 3600&lt;BR /&gt;
MAX_DIFF_SECS_HENCE = 604800&lt;BR /&gt;
MAX_EVENTS = 256&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 128&lt;BR /&gt;
MUST_BREAK_AFTER =&lt;BR /&gt;
MUST_NOT_BREAK_AFTER =&lt;BR /&gt;
MUST_NOT_BREAK_BEFORE =&lt;BR /&gt;
SEGMENTATION = indexing&lt;BR /&gt;
SEGMENTATION-all = full&lt;BR /&gt;
SEGMENTATION-inner = inner&lt;BR /&gt;
SEGMENTATION-outer = outer&lt;BR /&gt;
SEGMENTATION-raw = none&lt;BR /&gt;
SEGMENTATION-standard = standard&lt;BR /&gt;
SHOULD_LINEMERGE = False&lt;BR /&gt;
TRANSFORMS =&lt;BR /&gt;
TRUNCATE = 10000&lt;BR /&gt;
detect_trailing_nulls = false&lt;BR /&gt;
maxDist = 100&lt;BR /&gt;
priority =&lt;BR /&gt;
sourcetype =&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:03:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374874#M67908</guid>
      <dc:creator>aa123s</dc:creator>
      <dc:date>2020-09-29T18:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not breaking each log line into single events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374875#M67909</link>
      <description>&lt;P&gt;The event parsing doesn't happen on UF (for non structured data), so you need to put these changes on your Indexer/Heavy Forwarders  (wherever this UF is sending data to).  Preferably create an app and put the props.conf under that app (&lt;CODE&gt;$Splunk_Home/etc/apps/YourPropsApp/local/props.conf&lt;/CODE&gt;). A restart of Splunk would be required where you make the change. Also remember to use correct LINE_BREAKER regex (don't miss any escape characters).&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 23:16:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374875#M67909</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-02-13T23:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not breaking each log line into single events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374876#M67910</link>
      <description>&lt;P&gt;Unfortunately I don't have access to Indexer/HF... I will have to look for another solution, like breaking those lines at search time. Thanks anyways!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 15:53:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374876#M67910</guid>
      <dc:creator>aa123s</dc:creator>
      <dc:date>2018-02-14T15:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Splunk not breaking each log line into single events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374877#M67911</link>
      <description>&lt;P&gt;Youl should get the HF configured properly, even if it's not you who performs it.  Correct data onboarding is critical, and event breaking is one of the major parts of onboarding.&lt;/P&gt;

&lt;P&gt;You will be unhappy later if you try to do this at search time going forward.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 16:17:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Splunk-not-breaking-each-log-line-into-single-events/m-p/374877#M67911</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-02-14T16:17:40Z</dc:date>
    </item>
  </channel>
</rss>

