<?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: send to nullqueue events which have more than 100 lines in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428495#M75075</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/68181"&gt;@DavidHourani&lt;/a&gt;,&lt;/P&gt;

&lt;P&gt;found the golden path! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;[my_sourcetype]&lt;BR /&gt;
SHOULD_LINEMERGE=false&lt;BR /&gt;
NO_BINARY_CHECK=true&lt;BR /&gt;
CHARSET=UTF-8&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD=45&lt;BR /&gt;
disabled=false&lt;BR /&gt;
LINE_BREAKER =(&amp;lt;\/s:Envelope&amp;gt;)&lt;BR /&gt;
TIME_FORMAT=%Y-%m-%d %H:%M:%S.%4Q&lt;BR /&gt;
TIME_PREFIX=(&amp;lt;\/s:Envelope&amp;gt;[\r\n]+)?[&lt;BR /&gt;
TRUNCATE=3000&lt;/P&gt;

&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 01:52:02 GMT</pubDate>
    <dc:creator>robertosegantin</dc:creator>
    <dc:date>2020-09-30T01:52:02Z</dc:date>
    <item>
      <title>send to nullqueue events which have more than 100 lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428489#M75069</link>
      <description>&lt;P&gt;I have an XML file which has events made by many rows.&lt;BR /&gt;
I would like to send to null queue the events which have more than 100 rows.&lt;BR /&gt;
How can I do that?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2019 08:11:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428489#M75069</guid>
      <dc:creator>robertosegantin</dc:creator>
      <dc:date>2019-08-06T08:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: send to nullqueue events which have more than 100 lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428490#M75070</link>
      <description>&lt;P&gt;Hi @robertosegantin,&lt;/P&gt;

&lt;P&gt;I see three ways to go about this:&lt;/P&gt;

&lt;P&gt;1- The easiest way is to set &lt;CODE&gt;TRUNCATE&lt;/CODE&gt; limit in &lt;CODE&gt;props.conf&lt;/CODE&gt; for your sourcetype in order to avoid having more than a fixed number of a characters per event. This however will not completely remove the event but merely filter part of it.&lt;/P&gt;

&lt;P&gt;2- (Recommended) Use a combination of regexp to identify the long events and move them to the &lt;CODE&gt;nullqueue&lt;/CODE&gt;:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad#Discard_specific_events_and_keep_the_rest"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad#Discard_specific_events_and_keep_the_rest&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;3- Use a regular expression to select the useful info from the long 100 line event, and discard the rest. You can find this here:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/735219/index-selected-lines-in-a-multiline-event.html"&gt;https://answers.splunk.com/answers/735219/index-selected-lines-in-a-multiline-event.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I think 2 is best suited for what you're trying to achieve. You can use a regex to count the number of lines if needed, something like : &lt;CODE&gt;(.*(\n|\r)){100}&lt;/CODE&gt;, then send to null queue anything that matches.&lt;/P&gt;

&lt;P&gt;Let me know if that helps.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David &lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2019 08:42:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428490#M75070</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-08-06T08:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: send to nullqueue events which have more than 100 lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428491#M75071</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/68181"&gt;@DavidHourani&lt;/a&gt; ,&lt;/P&gt;

&lt;P&gt;thanks for your answer.&lt;BR /&gt;
I tried:&lt;/P&gt;

&lt;P&gt;== props.conf ==&lt;BR /&gt;
[my]&lt;BR /&gt;
CHARSET = UTF-8&lt;BR /&gt;
KV_MODE = xml&lt;BR /&gt;
MAX_EVENTS = 100000&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 28&lt;BR /&gt;
NO_BINARY_CHECK = true&lt;BR /&gt;
TIME_FORMAT = %Y-%m-%d %H:%M:%S.%4Q&lt;BR /&gt;
TIME_PREFIX = ^[&lt;BR /&gt;
category = Custom&lt;BR /&gt;
disabled = false&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
TRANSFORMS-nullqueue_more_than_100_lines = nullqueue_more_than_100_lines&lt;/P&gt;

&lt;P&gt;== transforms.conf == &lt;BR /&gt;
[nullqueue_more_than_100_lines]&lt;BR /&gt;
REGEX = (.*(\n|\r)){100,}&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;But it does not send events with more than 100 lines to nullqueue.&lt;BR /&gt;
I also tried with TRUNCATE=5000, but is does not work, too&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
Roberto&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:37:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428491#M75071</guid>
      <dc:creator>robertosegantin</dc:creator>
      <dc:date>2020-09-30T01:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: send to nullqueue events which have more than 100 lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428492#M75072</link>
      <description>&lt;P&gt;Hi @robertosegantin, Is this working now ?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 07:03:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428492#M75072</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-08-14T07:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: send to nullqueue events which have more than 100 lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428493#M75073</link>
      <description>&lt;P&gt;Hi @DavidHourani,&lt;BR /&gt;
sorry for late replay.&lt;BR /&gt;
The problem is that "TRUNCATE" and "TRANSFORMS" seem to work on single line, and they work before "SHOULD_LINEMERGE", which is true by default.&lt;BR /&gt;
In this way, when Splunk merges 150 xml lines into one event, the "TRUNCATE" and "TRANSFORMS" option work on single line, which has less than 100 lines (is only one!) and is less than 5000 byte&lt;/P&gt;

&lt;P&gt;Have I done some mistake?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 08:16:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428493#M75073</guid>
      <dc:creator>robertosegantin</dc:creator>
      <dc:date>2019-08-19T08:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: send to nullqueue events which have more than 100 lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428494#M75074</link>
      <description>&lt;P&gt;Hi @robertosegantin,&lt;/P&gt;

&lt;P&gt;Go for SHOULD_LINEMERGE = false and set a new line breaker which is the closing stanza for your xml. It should do the trick.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 10:17:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428494#M75074</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-08-19T10:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: send to nullqueue events which have more than 100 lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428495#M75075</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/68181"&gt;@DavidHourani&lt;/a&gt;,&lt;/P&gt;

&lt;P&gt;found the golden path! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;[my_sourcetype]&lt;BR /&gt;
SHOULD_LINEMERGE=false&lt;BR /&gt;
NO_BINARY_CHECK=true&lt;BR /&gt;
CHARSET=UTF-8&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD=45&lt;BR /&gt;
disabled=false&lt;BR /&gt;
LINE_BREAKER =(&amp;lt;\/s:Envelope&amp;gt;)&lt;BR /&gt;
TIME_FORMAT=%Y-%m-%d %H:%M:%S.%4Q&lt;BR /&gt;
TIME_PREFIX=(&amp;lt;\/s:Envelope&amp;gt;[\r\n]+)?[&lt;BR /&gt;
TRUNCATE=3000&lt;/P&gt;

&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:52:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428495#M75075</guid>
      <dc:creator>robertosegantin</dc:creator>
      <dc:date>2020-09-30T01:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: send to nullqueue events which have more than 100 lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428496#M75076</link>
      <description>&lt;P&gt;You're welcome! &lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 18:56:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/send-to-nullqueue-events-which-have-more-than-100-lines/m-p/428496#M75076</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-08-22T18:56:03Z</dc:date>
    </item>
  </channel>
</rss>

