<?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: Go through Pasringqueue twice to break files via \n in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255433#M189467</link>
    <description>&lt;P&gt;Looks fine to me:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1157i969C5DCE836F6D19/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The text editor formatted for line breaks to fit the window, it's one long line as in your example.&lt;/P&gt;</description>
    <pubDate>Sat, 19 Mar 2016 10:45:09 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2016-03-19T10:45:09Z</dc:date>
    <item>
      <title>Go through Pasringqueue twice to break files via \n</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255430#M189464</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a file that doesnt seems to be breakable via the standard line breaker since it's a full text file with no \n or \r whatsoever. Using delimiters for lines didnt work so I want to use  sedcmd on the keywords and add a \n as a suffix in order to define the lines. After that i wish to send the data back into the parsing queue and tag the whole thing with a new sourcetype to apply setting that use \n as a linebreaker.&lt;/P&gt;

&lt;P&gt;Bellow is what i have so far. sedcmd is working and redirection to the new sourcetype is too but the settings of that sourcetype (test1 bellow) isn't being applied so no line break is happening.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;PROPS&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  [test]
    BREAK_ONLY_BEFORE = blabla
    CHARSET = 
    DATETIME_CONFIG = 
    NO_BINARY_CHECK = true
    SEDCMD-replace = s/\sblabla/\nblabla/g
    SHOULD_LINEMERGE=false
    NO_BINARY_CHECK=true
    category = Custom
    pulldown_type = true
    TRANSFORMS-t1= redirect,reparse

    [test1]
    SHOULD_LINEMERGE=false
    NO_BINARY_CHECK=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;TRANSFORMS&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[reparse]
REGEX=(.)
FORMAT=parsingQueue
DEST_KEY=queue

[redirect]
REGEX=(.)
FORMAT = sourcetype::test1
DEST_KEY = MetaData:Sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;example data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blabla asd asd asd asd as                         asda sdasd asd asd                   blabla asd asd asdaddddddddddddddddddddddddddddddddddddddddddd    ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd           dddddddddddddddddddddddddddddddddddddd                     aaaaaaaweeeeeeeeeeeeeeeeeeeeeeee bla blabla assssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;thanks for the help,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2016 00:23:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255430#M189464</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2016-03-19T00:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Go through Pasringqueue twice to break files via \n</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255431#M189465</link>
      <description>&lt;P&gt;If you want to break on spaces before &lt;CODE&gt;blabla&lt;/CODE&gt; within a line, you could use something like this for only one parsing iteration:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[test]
SHOULD_LINEMERGE = false
LINE_BREAKER = (\s+)blabla
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will override the default line breaker that breaks on newlines with your custom definition of where a line should end.&lt;BR /&gt;
Note, this will consume the spaces from the first capturing group - they won't be part of either event before or after the break.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2016 00:51:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255431#M189465</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-19T00:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Go through Pasringqueue twice to break files via \n</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255432#M189466</link>
      <description>&lt;P&gt;it doesn't work tried all sorts of LINE_BREAKER and BREAK_ONLY_BEFORE options and nothing ^^ Thats why i want to go through this kind of loop. Try recreating the same file above and parsing it with this LINE_BREAKER, it wont do anything &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:09:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255432#M189466</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2020-09-29T09:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Go through Pasringqueue twice to break files via \n</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255433#M189467</link>
      <description>&lt;P&gt;Looks fine to me:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1157i969C5DCE836F6D19/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The text editor formatted for line breaks to fit the window, it's one long line as in your example.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2016 10:45:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255433#M189467</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-19T10:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Go through Pasringqueue twice to break files via \n</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255434#M189468</link>
      <description>&lt;P&gt;ummm i don't know....I might be facing some bug then...because yes logically what you sent "should" work..nothing happens though..anyway regardless of whether it is a bug or not, do you know how to send data back to the parsingqueue ? As I was trying to do above, 1-add \n via sed and 2 - send data to parsingqueue to break lines on \n &lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2016 00:06:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255434#M189468</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2016-03-20T00:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Go through Pasringqueue twice to break files via \n</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255435#M189469</link>
      <description>&lt;P&gt;And thank you for your help so far &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2016 00:06:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255435#M189469</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2016-03-20T00:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Go through Pasringqueue twice to break files via \n</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255436#M189470</link>
      <description>&lt;P&gt;I'd rather figure out why the right approach doesn't work on your end than come up with a convoluted workaround. Besides, by adding a line break to the events and parsing them again you'd also rely on &lt;CODE&gt;LINE_BREAKER = ([\r\n]+)&lt;/CODE&gt;. If that works, different regular expressions will work too.&lt;/P&gt;

&lt;P&gt;What happens when you recreate the data upload/preview screen I posted?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2016 00:30:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255436#M189470</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-20T00:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Go through Pasringqueue twice to break files via \n</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255437#M189471</link>
      <description>&lt;P&gt;Hello Martin,&lt;BR /&gt;
Thanks again for your help.&lt;BR /&gt;
Adding a new line to the events works with the default line breaker works out well, this is why i wanted to add it via the sed ^^ &lt;BR /&gt;
After re-testing a couple of times with the (\s+)blabla it worked but for some reason the "blabla" alone as a line breaker still doesnt. so  &lt;CODE&gt;LINE_BREAKER = (\s+)blabla&lt;/CODE&gt; works but  &lt;CODE&gt;LINE_BREAKER = blabla&lt;/CODE&gt; doesnt ^^&lt;BR /&gt;
Still curious to get the "workaround" to work though for testing purposes ^^ &lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2016 09:43:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255437#M189471</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2016-03-20T09:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Go through Pasringqueue twice to break files via \n</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255438#M189472</link>
      <description>&lt;P&gt;Well, if you don't use the working &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; from my answer then it certainly won't work &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Read up on &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt; at &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/Admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/Admin/Propsconf&lt;/A&gt; - it &lt;EM&gt;needs&lt;/EM&gt; a capturing group to mark the break itself, to mark the bit of the text that should be consumed by the line breaker.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* The regex must contain a capturing group -- a pair of parentheses which
  defines an identified subcomponent of the match.
* Wherever the regex matches, Splunk considers the start of the first
  capturing group to be the end of the previous event, and considers the end
  of the first capturing group to be the start of the next event.
* The contents of the first capturing group are discarded, and will not be
  present in any event.  You are telling Splunk that this text comes between
  lines.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 20 Mar 2016 12:32:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255438#M189472</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-20T12:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Go through Pasringqueue twice to break files via \n</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255439#M189473</link>
      <description>&lt;P&gt;ohhhhhh lol okay ! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; good to know &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; ill accept your answer kind sir &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;And about the second part, any clue how its done ? I've had it working once but i cant seem to get it to work again &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2016 16:22:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255439#M189473</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2016-03-20T16:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Go through Pasringqueue twice to break files via \n</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255440#M189474</link>
      <description>&lt;P&gt;First I'd actually send the events to the parsing queue, your question lists a transforms that sends them to the aggregation queue - that's too late for line breaking.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2016 17:15:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255440#M189474</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-20T17:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Go through Pasringqueue twice to break files via \n</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255441#M189475</link>
      <description>&lt;P&gt;yeah ^^ copy pasted the wrong transforms, but i tried sending it to the parsing queue...gonna fix that in the questions &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 19:31:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Go-through-Pasringqueue-twice-to-break-files-via-n/m-p/255441#M189475</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2016-03-21T19:31:32Z</dc:date>
    </item>
  </channel>
</rss>

