<?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 Filter events on UF in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Filter-events-on-UF/m-p/748647#M118965</link>
    <description>&lt;P&gt;I have a data source of significant size and I want to filter a large percentage of the data on the UF so it isnt sent to the Splunk indexers. How can this be done?&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jun 2025 05:55:11 GMT</pubDate>
    <dc:creator>chrisyounger</dc:creator>
    <dc:date>2025-06-25T05:55:11Z</dc:date>
    <item>
      <title>Filter events on UF</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-events-on-UF/m-p/748647#M118965</link>
      <description>&lt;P&gt;I have a data source of significant size and I want to filter a large percentage of the data on the UF so it isnt sent to the Splunk indexers. How can this be done?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 05:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-events-on-UF/m-p/748647#M118965</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2025-06-25T05:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Filter events on UF</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-events-on-UF/m-p/748648#M118966</link>
      <description>&lt;P&gt;Yes this is possible by using &lt;STRONG&gt;force_local_processing=true&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;force_local_processing = &amp;lt;boolean&amp;gt;
* Forces a universal forwarder to process all data tagged with this sourcetype
locally before forwarding it to the indexers.
* Data with this sourcetype is processed by the linebreaker,
aggerator, and the regexreplacement processors in addition to the existing
utf8 processor.
* Note that switching this property potentially increases the cpu
and memory consumption of the forwarder.
* Applicable only on a universal forwarder.
* Default: false&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;You should carefully consider if this option is right for you before deploying it. Read and understand the warning in the spec file (above). By parsing on a UF you are creating a "special snowflake" in your environment where data is parsed somewhere unusual.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Props.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[my_sourcetype]
# Use with caution. In most cases its best to let the the parsing occur on a Splunk enterprise server
force_local_processing = true
LINE_BREAKER = ([\r\n]+)
SHOULD_LINEMERGE = false
MAX_TIMESTAMP_LOOKAHEAD = ...
TIME_FORMAT = ...
TIME_PREFIX = ^
TRANSFORMS = my_sourcetype_dump_extra_events&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Transforms.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[my_sourcetype_dump_extra_events]
REGEX = discard_events_that_match_this_regex
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;Note that if you want to nullqueue/discard all events EXCEPT for those that match a regular expression, the usual documented method won't work (as far as my testing has revealed): &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You will instead need to use a negative assertion REGEX like so:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[my_sourcetype_dump_extra_events]
REGEX = ^((?!keep_events_that_match_this_regex).)*$
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;In my testing, discard events on UF's using force_local_processing and a negative assertion caused no measurable increase in CPU, Memory, Disk IO or Network traffic. I used the below query to check how much data was being sent from the UF to the indexers, and it showed a huge reduction:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| mstats sum(spl.mlog.tcpin_connections.kb) as kb where index=_metrics group="tcpin_connections" fwdType="uf" hostname=UF_NAME span=5m | timechart span=5m sum(kb)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 05:24:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-events-on-UF/m-p/748648#M118966</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2025-06-25T05:24:41Z</dc:date>
    </item>
  </channel>
</rss>

