<?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: BREAK_ONLY_BEFORE failed, setting TIME_FORMAT solved the problem in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34261#M6191</link>
    <description>&lt;P&gt;Updated answer above. And while Ayn has a point, it is still a fact that LINE_BREAKER is more efficient than the combination of SHOULD_LINEMERGE and BREAK_ONLY... directives.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 12:15:51 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2020-09-28T12:15:51Z</dc:date>
    <item>
      <title>BREAK_ONLY_BEFORE failed, setting TIME_FORMAT solved the problem</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34257#M6187</link>
      <description>&lt;P&gt;Hi, so I've been trying to split falsely merged (separate) events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;10:42:08  Checkpoint Completed:  duration was 0 seconds.
10:42:08  Checkpoint loguniq 4227, logpos 0x4ca7018, timestamp: 0x7f8d03be
10:42:08  Maximum server connections 1414 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;An obvious thing to do is to use BREAK_ONLY_BEFORE attribute - or is it? So here's what I tried in /local/props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host::some_host_name]
SHOULD_LINEMERGE = True
BREAK_ONLY_BEFORE = ^/d/d:/d/d:/d/d
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Surprisingly this didn't work. Needless to say I've tried countles variations of BREAK_ONLY_BEFORE and tried othe attributes. Finally I tried the TIME_FORMAT attribute:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host::some_host_name]
SHOULD_LINEMERGE = True
TIME_FORMAT = %H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...and it worked like a charm. Can someone explain why this worked while the latter didn't? And how should the proper BRAK\ONLY_BRFORE atrribute look like for this to work? I didn't find anything satysfying on the forums.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2012 09:34:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34257#M6187</guid>
      <dc:creator>yahooku</dc:creator>
      <dc:date>2012-08-14T09:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: BREAK_ONLY_BEFORE failed, setting TIME_FORMAT solved the problem</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34258#M6188</link>
      <description>&lt;P&gt;Well, &lt;/P&gt;

&lt;P&gt;First of all, I would not recommend you to use &lt;CODE&gt;[host::your_host]&lt;/CODE&gt; configuration stanzas in your props.conf file, since the rules would then apply to all events coming from this host, regardless of the format of the event/timestamp. It's much more logical to use the &lt;CODE&gt;[your_sourcetype]&lt;/CODE&gt; style of configuration, since rules are then applied based the type of data coming in, rather than from where it originated.&lt;/P&gt;

&lt;P&gt;Secondly, why use &lt;CODE&gt;SHOULD_LINEMERGE=true&lt;/CODE&gt;, if the events are single-line? This may be one of the reasons for your problems - Splunk tries to find a full timestamp (including date), and has to merge several lines to find some characters it think fits.&lt;/P&gt;

&lt;P&gt;Thirdly, though this may seem a bit redundant, is that your regex for BREAK_ONLY_BEFORE have forward slashes rather than backslashes.&lt;/P&gt;

&lt;P&gt;My suggestion is that you use the following instead;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
SHOULD_LINEMERGE=false
MAX_TIMESTAMP_LOOKAHEAD=8
TIME_FORMAT=%H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;UPDATE:&lt;/P&gt;

&lt;P&gt;if you also have multiline messages, then you could/should still not line_merge;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)\d\d:\d\d:\d\d\s
MAX_TIMESTAMP_LOOKAHEAD = 8
TIME_FORMAT = %H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:15:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34258#M6188</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2020-09-28T12:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: BREAK_ONLY_BEFORE failed, setting TIME_FORMAT solved the problem</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34259#M6189</link>
      <description>&lt;P&gt;Thanks for a quick answear. You are right about replacing host by source identifier - I have only one source from this host, but still this is not a good thing to do. &lt;/P&gt;

&lt;P&gt;About the SHOULD_LINEMERGE. Not all events are single-lined, only those which were merged together. &lt;/P&gt;

&lt;P&gt;And about the regex. Sorry for this mistake, just coppied a result of a some desparate attempt to make this work. I'm sure I also tried the right regex - I checked it in a text editor when the BREAK_ONLY_BEFORE dind't seem to work.  &lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2012 11:05:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34259#M6189</guid>
      <dc:creator>yahooku</dc:creator>
      <dc:date>2012-08-14T11:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: BREAK_ONLY_BEFORE failed, setting TIME_FORMAT solved the problem</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34260#M6190</link>
      <description>&lt;P&gt;As Splunk by default breaks events when it encounters a valid timestamp (as defined by the &lt;CODE&gt;BREAK_ONLY_BEFORE_DATE&lt;/CODE&gt; configuration parameter), improper line breaking is very often a symptom of improper timestamp parsing. So, configuring timestamp parsing correctly is a much better option than messing with other breaking directives - you get valid timestamps AND valid event breaking.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2012 13:28:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34260#M6190</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-08-14T13:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: BREAK_ONLY_BEFORE failed, setting TIME_FORMAT solved the problem</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34261#M6191</link>
      <description>&lt;P&gt;Updated answer above. And while Ayn has a point, it is still a fact that LINE_BREAKER is more efficient than the combination of SHOULD_LINEMERGE and BREAK_ONLY... directives.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:15:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34261#M6191</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2020-09-28T12:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: BREAK_ONLY_BEFORE failed, setting TIME_FORMAT solved the problem</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34262#M6192</link>
      <description>&lt;P&gt;Ok, thanks for clearing this out.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2012 06:33:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/BREAK-ONLY-BEFORE-failed-setting-TIME-FORMAT-solved-the-problem/m-p/34262#M6192</guid>
      <dc:creator>yahooku</dc:creator>
      <dc:date>2012-08-16T06:33:01Z</dc:date>
    </item>
  </channel>
</rss>

