<?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: Mixed one-line and multiline events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30389#M5301</link>
    <description>&lt;P&gt;By default Splunk will break events by timestamp, allowing for multiline events. Something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ERROR [timestamp1] [id1] long
message
here
ERROR [timestamp2][id2] short message here
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;will result in two events. In your example, you have five timestamps where three happen to be identical. You will get five events, one for each timestamp. This makes sense as the default configuration because different log events may happen at the same time but might be entirely unrelated to each other.&lt;/P&gt;

&lt;P&gt;In order to persuade Splunk to smush multiple timestamped lines into one event you would need an event-breaking pattern somewhere in the log to tell Splunk "every time you read this pattern you should start a new event". That would have to apply to single-line events in that source type as well.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Nov 2012 09:23:10 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2012-11-12T09:23:10Z</dc:date>
    <item>
      <title>Mixed one-line and multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30388#M5300</link>
      <description>&lt;P&gt;On remote host I have a log file which contains mixed one line and multiline events in the following format&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   ERROR [timestamp1] [id1] [message1_1]
   ERROR [timestamp1] [id1] [message1_2]
   ERROR [timestamp1] [id1] [message1_3]

   ERROR [timestamp2] [id2] [message2_1]
   ERROR [timestamp3] [id3] [message3_1]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, does splunk automagically treat multi lines with the same timestamp as one event block or  should I use heavy forwarder to extract all events based on timestamp and id ?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2012 08:46:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30388#M5300</guid>
      <dc:creator>jakubincloud</dc:creator>
      <dc:date>2012-11-12T08:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed one-line and multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30389#M5301</link>
      <description>&lt;P&gt;By default Splunk will break events by timestamp, allowing for multiline events. Something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ERROR [timestamp1] [id1] long
message
here
ERROR [timestamp2][id2] short message here
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;will result in two events. In your example, you have five timestamps where three happen to be identical. You will get five events, one for each timestamp. This makes sense as the default configuration because different log events may happen at the same time but might be entirely unrelated to each other.&lt;/P&gt;

&lt;P&gt;In order to persuade Splunk to smush multiple timestamped lines into one event you would need an event-breaking pattern somewhere in the log to tell Splunk "every time you read this pattern you should start a new event". That would have to apply to single-line events in that source type as well.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2012 09:23:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30389#M5301</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2012-11-12T09:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed one-line and multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30390#M5302</link>
      <description>&lt;P&gt;Yes, Splunk can divide multiline messages into logs, however in this case there is no simple pattern like text, so my question: can splunk group events based on regex  or should put simple line dividing each message in logs&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2012 09:39:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30390#M5302</guid>
      <dc:creator>jakubincloud</dc:creator>
      <dc:date>2012-11-12T09:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed one-line and multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30391#M5303</link>
      <description>&lt;P&gt;By "pattern" I mean "regular expression". For example, if you start events every time the regular expression "f.o.o" matches, you need to specify this in props.conf for the source type:&lt;/P&gt;

&lt;P&gt;BREAK_ONLY_BEFORE=f.o.o&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:46:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30391#M5303</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2020-09-28T12:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed one-line and multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30392#M5304</link>
      <description>&lt;P&gt;but this is a simple regular expression when you look for a static text. What I would like to achieve is splunk to load text block from the log file:&lt;BR /&gt;
    ERROR [timestamp] [id1] line1&lt;BR /&gt;
    ERROR [timestamp] [id1] line2&lt;BR /&gt;
and change it to event block with values &lt;BR /&gt;
    _time = timestamp, &lt;BR /&gt;
    id=[id1] &lt;BR /&gt;
    _raw=line1\nline2&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2012 11:06:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30392#M5304</guid>
      <dc:creator>jakubincloud</dc:creator>
      <dc:date>2012-11-13T11:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed one-line and multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30393#M5305</link>
      <description>&lt;P&gt;In order to achieve that you would need to strip out the duplicate timestamps and IDs for all subsequent lines prior to indexing. That's possible with a scripted input, you just need to implement the processing yourself. Splunk can do regex-based transformations before indexing, but recognizing the equality of your timestamps and IDs goes beyond the expressive power of regular expressions.&lt;/P&gt;

&lt;P&gt;An easier way would be to fix the logging to avoid the duplicate prefixes.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2012 11:24:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30393#M5305</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2012-11-13T11:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Mixed one-line and multiline events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30394#M5306</link>
      <description>&lt;P&gt;Thanks for clarification&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2012 18:27:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Mixed-one-line-and-multiline-events/m-p/30394#M5306</guid>
      <dc:creator>jakubincloud</dc:creator>
      <dc:date>2012-11-13T18:27:18Z</dc:date>
    </item>
  </channel>
</rss>

