<?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 Discard long messages? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Discard-long-messages/m-p/712521#M117685</link>
    <description>&lt;P&gt;I have an errant application that is sending too much data to my Splunk Enterprise instance.&lt;/P&gt;&lt;P&gt;This is causing licensing overage(s) &amp;amp; warnings.&lt;/P&gt;&lt;P&gt;Until I can fix all the occurrences of this application, I need to configure Splunk to just drop these oversized entries.&lt;/P&gt;&lt;P&gt;I don't want to reject/truncate all messages, just anything over say, 512k.&lt;/P&gt;&lt;P&gt;My understanding is I can do with updates to &lt;STRONG&gt;transform.conf&lt;/STRONG&gt;&amp;nbsp;&amp;amp; &lt;STRONG&gt;props.conf&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;Here's my &lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[drop_unwanted_logs]
REGEX = (DEBUG|healthcheck|keepalive)  # Drop logs containing these terms
DEST_KEY = queue
FORMAT = nullQueue

[drop_large_events]
REGEX = ^.{524288,}  # Matches any log &amp;gt;= 512 KB
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, I want this to focus on two of my HEC's, so I updated &lt;STRONG&gt;props.conf&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::http:event collector 1]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288

[source::http:event collector 2]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288

[sourcetype::http:event collector 1]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288

[sourcetype::http:event collector 2]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I heading in the right direction? Or, will the following apply to all HEC's?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[sourcetype::httpevent]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Feb 2025 19:50:22 GMT</pubDate>
    <dc:creator>BogeyMan</dc:creator>
    <dc:date>2025-02-25T19:50:22Z</dc:date>
    <item>
      <title>Discard long messages?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Discard-long-messages/m-p/712521#M117685</link>
      <description>&lt;P&gt;I have an errant application that is sending too much data to my Splunk Enterprise instance.&lt;/P&gt;&lt;P&gt;This is causing licensing overage(s) &amp;amp; warnings.&lt;/P&gt;&lt;P&gt;Until I can fix all the occurrences of this application, I need to configure Splunk to just drop these oversized entries.&lt;/P&gt;&lt;P&gt;I don't want to reject/truncate all messages, just anything over say, 512k.&lt;/P&gt;&lt;P&gt;My understanding is I can do with updates to &lt;STRONG&gt;transform.conf&lt;/STRONG&gt;&amp;nbsp;&amp;amp; &lt;STRONG&gt;props.conf&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;Here's my &lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[drop_unwanted_logs]
REGEX = (DEBUG|healthcheck|keepalive)  # Drop logs containing these terms
DEST_KEY = queue
FORMAT = nullQueue

[drop_large_events]
REGEX = ^.{524288,}  # Matches any log &amp;gt;= 512 KB
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, I want this to focus on two of my HEC's, so I updated &lt;STRONG&gt;props.conf&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::http:event collector 1]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288

[source::http:event collector 2]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288

[sourcetype::http:event collector 1]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288

[sourcetype::http:event collector 2]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I heading in the right direction? Or, will the following apply to all HEC's?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[sourcetype::httpevent]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 19:50:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Discard-long-messages/m-p/712521#M117685</guid>
      <dc:creator>BogeyMan</dc:creator>
      <dc:date>2025-02-25T19:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Discard long messages?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Discard-long-messages/m-p/712530#M117687</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/276827"&gt;@BogeyMan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess the main question is, do you want to drop data &amp;gt; 512k, or just truncate it?&lt;/P&gt;&lt;P&gt;If you want to truncate then your TRUNCATE = &amp;lt;n&amp;gt; values should work to truncate to 512k.&lt;/P&gt;&lt;P&gt;Your logic for&amp;nbsp;drop_unwanted_logs also looks good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know it might be pseudo-code, for the props.conf, you dont need to specify sourcetype::&amp;lt;yourSourcetype&amp;gt;, its just [&amp;lt;yourSourcetype&amp;gt;]&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::http:event collector 1]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288

[source::http:event collector 2]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288

[sourcetype1]
TRANSFORMS-null=drop_large_events
TRUNCATE = 524288

[sourcetype2]
TRANSFORMS-null=drop_unwanted_logs
TRUNCATE = 524288&lt;/LI-CODE&gt;&lt;P&gt;Please let me know how you get on and consider accepting this answer or adding karma this answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 21:03:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Discard-long-messages/m-p/712530#M117687</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-02-25T21:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Discard long messages?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Discard-long-messages/m-p/712545#M117689</link>
      <description>&lt;P&gt;Right now, just looking to drop/discard data &amp;gt; 512k.&lt;/P&gt;&lt;P&gt;If I can get this working, we may refine.&lt;/P&gt;&lt;P&gt;Now, when you refer to "sourcetype", is that "httpevent" (to refer to all defined HECs), or, is that the name of the defined event collector (in my example "event collector 1"?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 22:31:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Discard-long-messages/m-p/712545#M117689</guid>
      <dc:creator>BogeyMan</dc:creator>
      <dc:date>2025-02-25T22:31:13Z</dc:date>
    </item>
  </channel>
</rss>

