<?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: Event breaking fails randomly in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342414#M5314</link>
    <description>&lt;P&gt;Thanks alot!&lt;BR /&gt;
I've tested what you suggested, but it did not work.&lt;BR /&gt;
Working on the comments given by mmodestino_splunk&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jun 2017 13:06:45 GMT</pubDate>
    <dc:creator>jkst1972_2</dc:creator>
    <dc:date>2017-06-13T13:06:45Z</dc:date>
    <item>
      <title>Event breaking fails randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342411#M5311</link>
      <description>&lt;P&gt;I have an issue with event line breaking in an access log I hope someone can guide me on.&lt;BR /&gt;
We have an access log where every line is an event.  The issue: randomly events are broken mid line.&lt;/P&gt;

&lt;P&gt;Looking at the source file on the app server, event breaking is always correct.&lt;BR /&gt;
When using “Show source“ in Splunk GUI, it indicates wrong event breaking. &lt;/P&gt;

&lt;P&gt;Some more details on our config :&lt;BR /&gt;
• We use an index cluster (4 nodes) with auto load balance&lt;BR /&gt;
• We use “useAck”&lt;/P&gt;

&lt;P&gt;Discoveries summarized :&lt;BR /&gt;
• Line breaking are always correct when looking on the source file on the application servers.&lt;BR /&gt;
• Using “show source“ in splunk always indicates the wrong event breaking when the error occurs.&lt;BR /&gt;
• When the issue occur the event breaking in splunk occur with a random amount of bytes into the line. &lt;BR /&gt;
• There are 4 application servers generating the access logs running Splunk forwarder - the errors occurs on all of the servers, equally distributed.&lt;BR /&gt;
• The access log file on the servers are rotated midnight every night&lt;BR /&gt;
• The occurrence rate of the issue correlate with increasing volume (the issue is more often seen during high-volume periods than low-volume periods).&lt;BR /&gt;
• The issue does not correlate with the time the forwarder switch indexer (as part of the autoLB functionality). Tested this based on a hypothesis that the wrong event breaking occur when the forwarder switch to start sending to the next indexer.&lt;BR /&gt;
• The ratio error vs. totalcount varies between 0.05-0.12 precent, and correlate with increased amount of events&lt;/P&gt;

&lt;P&gt;One event sample with wrong event break:&lt;BR /&gt;
[09/Jun/2017:10:15:36 +0200] client_ip=&lt;EM&gt;.&lt;/EM&gt;.&lt;EM&gt;.&lt;/EM&gt; user=- verb=GET uri=/……&amp;amp;WIDTH=256&amp;amp;HEIGHT=256 user_agent="Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, li&lt;BR /&gt;
ke Gecko) Chrome/58.0.3029.110 Safari/537.36 OPR/&lt;EM&gt;.&lt;/EM&gt;.&lt;EM&gt;.&lt;/EM&gt;" origin=- referer=&lt;A href="http://www.***/" target="_blank"&gt;http://www.***/&lt;/A&gt; resp_code=200 resp_time=5 xfwdfor="&lt;EM&gt;.&lt;/EM&gt;.&lt;EM&gt;.&lt;/EM&gt;, &lt;EM&gt;.&lt;/EM&gt;.&lt;EM&gt;.&lt;/EM&gt;" guid=b3812af9-6715-a492-0afb-73ddbe57428d&lt;/P&gt;

&lt;P&gt;I have added the following props.conf (on the indexers) for the sourcetype :&lt;/P&gt;

&lt;P&gt;[appname-access-log]&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 = true&lt;BR /&gt;
CHARSET = UTF-8&lt;BR /&gt;
DATETIME_CONFIG = /etc/datetime.xml&lt;BR /&gt;
HEADER_MODE =&lt;BR /&gt;
LEARN_SOURCETYPE = true&lt;BR /&gt;
LINE_BREAKER_LOOKBEHIND = 100&lt;BR /&gt;
LOOKUP-dropdowns = dropdownsLookup host OUTPUT unix_category unix_group&lt;BR /&gt;
MATCH_LIMIT = 100000&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 = true&lt;BR /&gt;
TIME_PREFIX = [&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 14:25:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342411#M5311</guid>
      <dc:creator>jkst1972_2</dc:creator>
      <dc:date>2020-09-29T14:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Event breaking fails randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342412#M5312</link>
      <description>&lt;P&gt;Just have this as your sourcetype and test the line breaking once. Remove any other line breaker related configuration apart from the below and try.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[appname-access-log]
TIME_PREFIX = \[
MAX_TIMESTAMP_LOOKAHEAD = 30
TIME_FORMAT = %d/%b/%Y:%T %z
LINE_BREAKER = ([\n\r]+)(?=\[\d+\/\w+\/\d+\:\d+)
SHOULD_LINEMERGE = False
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Jun 2017 12:05:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342412#M5312</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-06-12T12:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Event breaking fails randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342413#M5313</link>
      <description>&lt;P&gt;Why are you linemerging? Are these events not all one line? Are you using a custom linebreaker?&lt;/P&gt;

&lt;P&gt;Are you using a UF on the app server? Is there a Heavy Forwarder involved in the data path to the indexers?&lt;/P&gt;

&lt;P&gt;Keep in mind, examining the source file after the fact is not a true representation of what was going on, as Splunk's tail reader monitors in close to real time. The general behavior I have found is that there was a break in the file write so Splunk thinks the line is done or has been closed. &lt;/P&gt;

&lt;P&gt;I have this situation at one of my clients and in another answers post, and am trying to get a sure fire way to identify root cause. &lt;A href="https://answers.splunk.com/answers/545031/sending-logs-over-scp-to-heavy-forwarder-why-does-1.html#comment-546394"&gt;https://answers.splunk.com/answers/545031/sending-logs-over-scp-to-heavy-forwarder-why-does-1.html#comment-546394&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Are you using forceTimeBasedAutoLB?&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.1/Admin/Outputsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.1/Admin/Outputsconf&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;forceTimebasedAutoLB = [true|false]
* Forces existing streams to switch to newly elected indexer every
  AutoLB cycle.
* On universal forwarders, use the EVENT_BREAKER_ENABLE and
  EVENT_BREAKER settings in props.conf rather than forceTimebasedAutoLB
  for improved load balancing, line breaking, and distribution of events.
* Defaults to false.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also do you see either of these symptoms on the forwarder(s) involved?&lt;/P&gt;

&lt;P&gt;1) If there are far too many files getting dropped at the same time. There will be a log message "File descriptor cache is full (100), trimming".&lt;BR /&gt;
2) There are TcpOutputProc WARN message regarding read timeout.&lt;/P&gt;

&lt;P&gt;If none of the above apply feel free to prepare to open a case an gather debug from TailReader/WatchedFile and TailingProcessor and open a case. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.1/Troubleshooting/Enabledebuglogging"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.1/Troubleshooting/Enabledebuglogging&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Use the cli commands so that you dont need to restart splunk.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2017 13:06:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342413#M5313</guid>
      <dc:creator>mattymo</dc:creator>
      <dc:date>2017-06-12T13:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Event breaking fails randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342414#M5314</link>
      <description>&lt;P&gt;Thanks alot!&lt;BR /&gt;
I've tested what you suggested, but it did not work.&lt;BR /&gt;
Working on the comments given by mmodestino_splunk&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 13:06:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342414#M5314</guid>
      <dc:creator>jkst1972_2</dc:creator>
      <dc:date>2017-06-13T13:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Event breaking fails randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342415#M5315</link>
      <description>&lt;P&gt;Thank you mmodestino_splunk&lt;/P&gt;

&lt;P&gt;On the app servers there is UF and there is no HF between the UF and the INXers.&lt;BR /&gt;
1) I have tested the following on the forwarder &lt;BR /&gt;
* outputs.conf&lt;BR /&gt;
 - forceTimebasedAutoLB = false&lt;BR /&gt;
* props.conf &lt;BR /&gt;
 - EVENT_BREAKER_ENABLE = true&lt;/P&gt;

&lt;P&gt;The issue remained the same&lt;/P&gt;

&lt;P&gt;2) I have not found any errors of type File descriptor cache is full (100) trimming&lt;/P&gt;

&lt;P&gt;3)  I have not found any warnings of type TcpOutputProc&lt;/P&gt;

&lt;P&gt;I will turn on debugging and open a case&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:27:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342415#M5315</guid>
      <dc:creator>jkst1972_2</dc:creator>
      <dc:date>2020-09-29T14:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Event breaking fails randomly</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342416#M5316</link>
      <description>&lt;P&gt;Were you able to get this issue resolved? I'm seeing this issue on a log that is generated on the search head, no forwarder involved. The lines themselves are thousands of characters long so I think I have the same issue as you.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 20:41:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Event-breaking-fails-randomly/m-p/342416#M5316</guid>
      <dc:creator>romedome</dc:creator>
      <dc:date>2018-04-12T20:41:16Z</dc:date>
    </item>
  </channel>
</rss>

