<?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: Can you help me fix my regex to event break a multiline file? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451171#M127774</link>
    <description>&lt;P&gt;HI tb5821. You should accept the answer to this question and create a new question with the relevant details. That way we can help you better &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Feb 2019 23:40:09 GMT</pubDate>
    <dc:creator>chrisyounger</dc:creator>
    <dc:date>2019-02-11T23:40:09Z</dc:date>
    <item>
      <title>Can you help me fix my regex to event break a multiline file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451165#M127768</link>
      <description>&lt;P&gt;I have a multiline file that I'm trying to get Splunk to understand... note that I'm not using the .conf files, but relying on the add new data UI within Splunk to help... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;geo {
id: 0
internal_name: "TEST"
type: LIST
zip: 7
description: "TEST"
}
geo {
 id: 1
internal_name: "TEST"
 type: LIST
zip: 5
 description: "TEST"
}
geo {
id: 2
internal_name: "TEST"
type: LIST
zip: 1
description: "TEST"
}
geo {
id: 3
internal_name: "TEST"
type: LIST
zip: 2
description: "TEST"
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've got this regex working as PCRE to break things up into events, but when I use that as the line breaker regex in Splunk, it just spits out one massive event....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(^geo \{(?s).*?\})
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What am I doing wrong? &lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 18:41:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451165#M127768</guid>
      <dc:creator>tb5821</dc:creator>
      <dc:date>2019-02-11T18:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me fix my regex to event break a multiline file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451166#M127769</link>
      <description>&lt;P&gt;Hi tb5821,&lt;/P&gt;

&lt;P&gt;try these settings in the advanced settings of the &lt;CODE&gt;add data&lt;/CODE&gt; UI:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ __auto__learned__ ]
SHOULD_LINEMERGE=true
NO_BINARY_CHECK=true
BREAK_ONLY_BEFORE=geo \{
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I reckon the &lt;CODE&gt;^&lt;/CODE&gt; in your regex does not work.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 19:08:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451166#M127769</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-02-11T19:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me fix my regex to event break a multiline file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451167#M127770</link>
      <description>&lt;P&gt;The capturing group in LINE_BREAKER should be set to the value that should be &lt;EM&gt;deleted&lt;/EM&gt;, not to what should be captured. Try this setting&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;LINE_BREAKER = ([\r\n]+)\s*geo\s{&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;All the best.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 19:36:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451167#M127770</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-02-11T19:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me fix my regex to event break a multiline file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451168#M127771</link>
      <description>&lt;P&gt;thanks seems to work better but now I'm getting an exceeded 256 lines for some of my messages... is there an advanced setting to increase that limit?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 19:37:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451168#M127771</guid>
      <dc:creator>tb5821</dc:creator>
      <dc:date>2019-02-11T19:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me fix my regex to event break a multiline file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451169#M127772</link>
      <description>&lt;P&gt;yep, you can use &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MAX_EVENTS = &amp;lt;integer&amp;gt;
* Specifies the maximum number of input lines to add to any event.
* Splunk software breaks after the specified number of lines are read.
* Defaults to 256 (lines).
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if you are sure that this is correct and the one event is over 256 lines.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 20:07:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451169#M127772</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-02-11T20:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me fix my regex to event break a multiline file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451170#M127773</link>
      <description>&lt;P&gt;Thanks - this worked out and I think better than ‘break only before’ —- one more question that  line that says zip: 0 actually has multiple zip:values all on that one line per event - I wrote another regex which should extract all those values but it only gets the first! Thoughts?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 22:25:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451170#M127773</guid>
      <dc:creator>tb5821</dc:creator>
      <dc:date>2019-02-11T22:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me fix my regex to event break a multiline file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451171#M127774</link>
      <description>&lt;P&gt;HI tb5821. You should accept the answer to this question and create a new question with the relevant details. That way we can help you better &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 23:40:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451171#M127774</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-02-11T23:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me fix my regex to event break a multiline file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451172#M127775</link>
      <description>&lt;P&gt;Absolutely @chrisyoungerjds  as &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.3/Admin/Propsconf" target="_blank"&gt;props.conf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;says -&lt;/P&gt;

&lt;P&gt;LINE_BREAKER = &lt;BR /&gt;
* Specifies a regex that determines how the raw text stream is broken into&lt;BR /&gt;
  initial events, before line merging takes place. (See the SHOULD_LINEMERGE&lt;BR /&gt;
  setting, below)&lt;BR /&gt;
* Defaults to ([\r\n]+), meaning data is broken into an event for each line,&lt;BR /&gt;
  delimited by any number of carriage return or newline characters.&lt;BR /&gt;
* The regex must contain a capturing group -- a pair of parentheses which&lt;BR /&gt;
  defines an identified subcomponent of the match.&lt;BR /&gt;
* Wherever the regex matches, &lt;STRONG&gt;Splunk software considers the start of the first&lt;BR /&gt;
  capturing group to be the end of the previous event, and considers the end&lt;BR /&gt;
  of the first capturing group to be the start of the next event.&lt;/STRONG&gt;&lt;BR /&gt;
* The contents of the first capturing group are discarded, and will not be&lt;BR /&gt;
  present in any event.  You are telling Splunk software that this text comes &lt;BR /&gt;
  between lines.&lt;BR /&gt;
* NOTE: You get a significant boost to processing speed when you use&lt;BR /&gt;
  LINE_BREAKER to delimit multi-line events (as opposed to using&lt;BR /&gt;
  SHOULD_LINEMERGE to reassemble individual lines into multi-line events).&lt;BR /&gt;
  * When using LINE_BREAKER to delimit events, SHOULD_LINEMERGE should be set&lt;BR /&gt;
    to false, to ensure no further combination of delimited events occurs.&lt;BR /&gt;
  * Using LINE_BREAKER to delimit events is discussed in more detail in the &lt;BR /&gt;
    documentation. Search the documentation for "configure event line breaking" for details.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:12:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451172#M127775</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2020-09-29T23:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me fix my regex to event break a multiline file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451173#M127776</link>
      <description>&lt;P&gt;Click &lt;CODE&gt;Accept&lt;/CODE&gt; to close this question and ask another one.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 02:08:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-fix-my-regex-to-event-break-a-multiline-file/m-p/451173#M127776</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-12T02:08:46Z</dc:date>
    </item>
  </channel>
</rss>

