<?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: Discard event after 10 lines in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Discard-event-after-10-lines/m-p/376112#M94154</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
Thanks for the reply.&lt;BR /&gt;
I am indexing file from Web UI. I created props.conf and transforms.conf in default directory as mentioned.&lt;BR /&gt;
Restarted Splunk. Then, when I select sourcetype as" testSourceType", I see transforms name in Advance but the right hand side prieview still shows large events and not discarding lines after 10.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Sep 2018 13:16:02 GMT</pubDate>
    <dc:creator>anantdeshpande</dc:creator>
    <dc:date>2018-09-17T13:16:02Z</dc:date>
    <item>
      <title>Discard event after 10 lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Discard-event-after-10-lines/m-p/376110#M94152</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have many events of 500 lines. Only first 10 lines are important. How to truncate or discard or ignore the remaining lines before indexing?&lt;BR /&gt;
When I use MAX_EVENTS in props.conf, Splunk breaks event after 10 lines and creats new event. Tried using BREAK_ONLY_BEFORE, LINEBREAK but nothing seems working.&lt;/P&gt;

&lt;P&gt;Please suggest props.conf entry to index only 10 lines from event.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:16:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Discard-event-after-10-lines/m-p/376110#M94152</guid>
      <dc:creator>anantdeshpande</dc:creator>
      <dc:date>2020-09-29T21:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Discard event after 10 lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Discard-event-after-10-lines/m-p/376111#M94153</link>
      <description>&lt;P&gt;Check this one - &lt;/P&gt;

&lt;P&gt;In inputs.conf &lt;BR /&gt;
&lt;CODE&gt;[monitor:///app/tmp/testfile] &lt;BR /&gt;
 sourcetype = testSourceType &lt;BR /&gt;
index = main &lt;BR /&gt;
disabled = 0 &lt;BR /&gt;
whitelist = .log$&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;In props.conf &lt;BR /&gt;
 [testSourceType] &lt;BR /&gt;
&lt;CODE&gt;TRANSFORMS-shortenEvents = keepOnly10Lines&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;In transforms.conf &lt;BR /&gt;
&lt;CODE&gt;[keepOnly10Lines] &lt;BR /&gt;
 REGEX = (?m)^((.*\n){10})((.*\n)*)&lt;BR /&gt;
 FORMAT = $1&lt;BR /&gt;
 DEST_KEY = _raw&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 12:50:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Discard-event-after-10-lines/m-p/376111#M94153</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2018-09-17T12:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Discard event after 10 lines</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Discard-event-after-10-lines/m-p/376112#M94154</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Thanks for the reply.&lt;BR /&gt;
I am indexing file from Web UI. I created props.conf and transforms.conf in default directory as mentioned.&lt;BR /&gt;
Restarted Splunk. Then, when I select sourcetype as" testSourceType", I see transforms name in Advance but the right hand side prieview still shows large events and not discarding lines after 10.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 13:16:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Discard-event-after-10-lines/m-p/376112#M94154</guid>
      <dc:creator>anantdeshpande</dc:creator>
      <dc:date>2018-09-17T13:16:02Z</dc:date>
    </item>
  </channel>
</rss>

