<?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 does event breaking sometimes occur in the middle of multiline events with my current configuration? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-event-breaking-sometimes-occur-in-the-middle-of/m-p/233364#M45524</link>
    <description>&lt;P&gt;Give this property a try. This seems more related to your way of logging data (each transaction is a single events with multiple lines)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;multiline_event_extra_waittime = [true|false]
*By default, Splunk Enterprise sends an event delimiter when (1) it reaches EOF of a file it monitors and (2) the last char it reads is a newline.
*In some cases, it takes time for all lines of a multiple-line event to arrive.
*Set to true to delay sending an event delimiter until the time that Splunk Enterprise closes the file, as defined by the time_before_close attribute, to allow all event lines to arrive.
*Default to false.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 14 Jan 2016 19:57:09 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-01-14T19:57:09Z</dc:date>
    <item>
      <title>Why does event breaking sometimes occur in the middle of multiline events with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-event-breaking-sometimes-occur-in-the-middle-of/m-p/233363#M45523</link>
      <description>&lt;P&gt;We have a forwarder installed on a Linux server that forwards data from application log files to our indexer. On the forwarder, I have inputs.conf set up as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///usr/local/copient/logs/.../*_scanLog]
disabled = false
index = transactions
sourcetype = scanlog    
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On the indexer, I have props.conf set up as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[scanlog]
MAX_TIMESTAMP_LOOKAHEAD = 28
SHOULD_LINEMERGE = true
BREAK_ONLY_BEFORE = (NEW FILE HANDLE)
MAX_EVENTS = 2000
CHARSET = 
DATETIME_CONFIG =
NO_BINARY_CHECK = true
category = Custom
disabled = false
pulldown_type = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The transactions each take between 0.3 and 0.4 seconds to finish in this particular environment, and about 50% of the test transactions I run get collected as a single event. The other 50%, however, break at some point in the middle. All of the transactions are identical, except for the aforementioned slight variance in processing times. Sometimes the events break after 13 out of the 202 lines in each transaction; sometimes they break much closer to the middle.&lt;/P&gt;

&lt;P&gt;A sample of the transaction data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;3 - {24519} [1452798558.77883] xmlInquery beginning at January 14, 2016, 2:09 pm (NEW FILE HANDLE)
3 - {24519} [1452798558.77899] -------------------------------------------
3 - {24519} [1452798558.77903] termnum=3&amp;amp;n=54884070&amp;amp;mesgid=236&amp;amp;message=&amp;lt;Transaction&amp;gt;&amp;lt;PosHeader&amp;gt;&amp;lt;Discount&amp;gt;-1.28&amp;lt;/Discount&amp;gt;&amp;lt;Subtotal&amp;gt;2.50&amp;lt;/Subtotal&amp;gt;&amp;lt;MethodOfPayment&amp;gt;0600&amp;lt;/MethodOfPayment&amp;gt;&amp;lt;TransactionType&amp;gt;Online&amp;lt;/TransactionType&amp;gt;&amp;lt;TransactionID&amp;gt;54884070&amp;lt;/TransactionID&amp;gt;&amp;lt;StoreID&amp;gt;0001&amp;lt;/StoreID&amp;gt;&amp;lt;MemberID&amp;gt;SCRUBBED&amp;lt;/MemberID&amp;gt;&amp;lt;CardType&amp;gt;0&amp;lt;/CardType&amp;gt;&amp;lt;TerminalID&amp;gt;3&amp;lt;/TerminalID&amp;gt;&amp;lt;PosTimestamp&amp;gt;2016-01-14T14:09:00&amp;lt;/PosTimestamp&amp;gt;&amp;lt;/PosHeader&amp;gt;&amp;lt;Basket&amp;gt;&amp;lt;LineItem&amp;gt;&amp;lt;ItemID&amp;gt;SCRUBBED&amp;lt;/ItemID&amp;gt;&amp;lt;Qty&amp;gt;2.000&amp;lt;/Qty&amp;gt;&amp;lt;Total&amp;gt;2.50&amp;lt;/Total&amp;gt;&amp;lt;/LineItem&amp;gt;&amp;lt;/Basket&amp;gt;&amp;lt;/Transaction&amp;gt;
3 - {24519} [1452798558.77991] Location Option [1] = 2 (0) SiteSpecificOptionValues
3 - {24519} [1452798558.78005] Setting BoxID was delayed to XML parsing time. 
3 - {24519} [1452798558.78107] lookup boxid returns 
3 - {24519} [1452798558.78111] No UniqueBoxID found, add new box location to boxlocations.
3 - {24519} [1452798558.78332] @promo_engine set boxid=15523, real boxid=3
3 - {24519} [1452798558.78355] Removed Display Mapping for Terminal 15523
3 - {24519} [1452798558.78378] search for lane type of 3, uniqueboxid = 15523
3 - {24519} [1452798558.78421] Unknown BoxID - creating YellowBoxes entry with default values
3 - {24519} [1452798558.78627] Created new yellowbox entry for terminal 15523 (4,3,0)
3 - {24519} [1452798558.78944] CardNum=SCRUBBED;CardType=0;LocationID=1124;BoxID=15523;localServerSerial=3;transnum=54884070
3 - {24519} [1452798558.91473] No instantwin trigger found.
3 - {24519} [1452798558.91675] Checking database for exclusion groups.
3 - {24519} [1452798558.91708] Checking System Wide Exclusion: EligMesg: 1, DiscMesg: 1, non-disPGID: 3 not-EliglePGID: 2
3 - {24519} [1452798558.91772] System Wide Exclusion (66):2 (67): 0 - Eligible: 1 , Discountable: 1
3 - {24519} [1452798558.91876] TransItemID=116
3 - {24519} [1452798558.92187] FOD: SCRUBBED, 0, 2 Items
3 - {24519} [1452798558.93282] hhpk=0 ,userid=SCRUBBED, cardstatus=1, cardtype=0, cardpk=4223918.
3 - {24519} [1452798558.93290] Found userid SCRUBBED in 0.010 seconds
3 - {24519} [1452798558.93694] Set hhPrimaryID=userid due to no hhprimaryid
3 - {24519} [1452798558.93702] Insert into users and cardids tables took 0.004 seconds
3 - {24519} [1452798558.93707] employee= ;CustomerStatusID=1;hhPrimaryID=SCRUBBED;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried setting time_before_close in the inputs.conf on the forwarder, but I found that 1) it still broke the first transaction in the middle, and 2) proceeded to block any further messages from the same log file until the time period set in time_before_close expired.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:25:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-event-breaking-sometimes-occur-in-the-middle-of/m-p/233363#M45523</guid>
      <dc:creator>antessima</dc:creator>
      <dc:date>2020-09-29T08:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why does event breaking sometimes occur in the middle of multiline events with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-event-breaking-sometimes-occur-in-the-middle-of/m-p/233364#M45524</link>
      <description>&lt;P&gt;Give this property a try. This seems more related to your way of logging data (each transaction is a single events with multiple lines)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;multiline_event_extra_waittime = [true|false]
*By default, Splunk Enterprise sends an event delimiter when (1) it reaches EOF of a file it monitors and (2) the last char it reads is a newline.
*In some cases, it takes time for all lines of a multiple-line event to arrive.
*Set to true to delay sending an event delimiter until the time that Splunk Enterprise closes the file, as defined by the time_before_close attribute, to allow all event lines to arrive.
*Default to false.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jan 2016 19:57:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-event-breaking-sometimes-occur-in-the-middle-of/m-p/233364#M45524</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-01-14T19:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why does event breaking sometimes occur in the middle of multiline events with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-event-breaking-sometimes-occur-in-the-middle-of/m-p/233365#M45525</link>
      <description>&lt;P&gt;I tried this just now and it does fix that particular problem, but I am noticing that the events are noticeably slower to show up on the indexer than before. Is there a way to have my cake and eat it too, i.e. tell the forwarder or indexer what the beginning &lt;EM&gt;and&lt;/EM&gt; the end of the event are? Our transactions have the same ending sequences, so it is predictable...&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 20:05:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-event-breaking-sometimes-occur-in-the-middle-of/m-p/233365#M45525</guid>
      <dc:creator>antessima</dc:creator>
      <dc:date>2016-01-14T20:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why does event breaking sometimes occur in the middle of multiline events with my current configuration?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-event-breaking-sometimes-occur-in-the-middle-of/m-p/233366#M45526</link>
      <description>&lt;P&gt;Try setting time_before_close as well to a number equal to max duration of a transaction.&lt;/P&gt;

&lt;P&gt;You do have settings like these that may help as well. &lt;BR /&gt;
MUST_NOT_BREAK_AFTER = &lt;BR /&gt;
* When set and the current line matches the regular expression, Splunk does not break on any&lt;BR /&gt;
  subsequent lines until the MUST_BREAK_AFTER expression matches.&lt;BR /&gt;
* Defaults to empty.&lt;/P&gt;

&lt;P&gt;MUST_NOT_BREAK_BEFORE = &lt;BR /&gt;
* When set and the current line matches the regular expression, Splunk does not break the&lt;BR /&gt;
  last event before the current line.&lt;BR /&gt;
* Defaults to empty.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:26:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-event-breaking-sometimes-occur-in-the-middle-of/m-p/233366#M45526</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T08:26:00Z</dc:date>
    </item>
  </channel>
</rss>

