<?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 How to configure a Forwarder to filter and send only the events I want? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90696#M18839</link>
    <description>&lt;P&gt;I have a temporary need to filter and forward ONLY a specific set of events to my indexer. &lt;/P&gt;

&lt;P&gt;I see from a couple other answers already posted that I can blacklist to the nullQueue, etc, prior to forwarding.&lt;/P&gt;

&lt;P&gt;However, in this case, what I really need to do is whitelist down to a few WinEvent codes (and possibly a few other text patterns) that are required to be indexed, and then only send THOSE events.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Nov 2010 07:09:35 GMT</pubDate>
    <dc:creator>maverick</dc:creator>
    <dc:date>2010-11-17T07:09:35Z</dc:date>
    <item>
      <title>How to configure a Forwarder to filter and send only the events I want?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90696#M18839</link>
      <description>&lt;P&gt;I have a temporary need to filter and forward ONLY a specific set of events to my indexer. &lt;/P&gt;

&lt;P&gt;I see from a couple other answers already posted that I can blacklist to the nullQueue, etc, prior to forwarding.&lt;/P&gt;

&lt;P&gt;However, in this case, what I really need to do is whitelist down to a few WinEvent codes (and possibly a few other text patterns) that are required to be indexed, and then only send THOSE events.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2010 07:09:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90696#M18839</guid>
      <dc:creator>maverick</dc:creator>
      <dc:date>2010-11-17T07:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure a Forwarder to filter and send only the events I want?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90697#M18840</link>
      <description>&lt;P&gt;One way to achieve this goal of whitelisting only events you want from the forwarder (which BTW, defeats the whole purpose of using a forwarder to begin with, IMHO, but thats whole other story in itself), you can setup your default output TCP routing queue to be a nonexistent ip and port in your outputs.conf, therefore, turning off all event forwarding by default. Then you can setup a second TCP output queue to use for forwarding ONLY the events that match you regular expression pattern in transforms.conf file. Finally, you can associate the whitelist matching congif in your props.conf with your sourcetypes, host, or source, per usual setup.&lt;/P&gt;

&lt;P&gt;Below is a whitelisting configuration I tested and that works on a heavy forwarder running on Windows.&lt;/P&gt;

&lt;P&gt;Please note that in the last line in the config below, you should replace the server value that says "" with the value that matches the ip address of your own Splunk indexing server before restarting.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;# props.conf&lt;BR /&gt;
# --------------&lt;BR /&gt;
[WinEventLog:System]&lt;BR /&gt;
TRANSFORMS-set = allowtheseevents&lt;/P&gt;

&lt;P&gt;[WinEventLog:Security]&lt;BR /&gt;
TRANSFORMS-sec = allowtheseevents&lt;/P&gt;

&lt;PRE&gt;
&lt;/PRE&gt;

&lt;P&gt;# transforms.conf&lt;BR /&gt;
# ---------------------&lt;BR /&gt;
[allowtheseevents]&lt;BR /&gt;
REGEX = (?msi).*?EventCode\=(4624|4648|4672|4778|7035|7036).*&lt;BR /&gt;
DEST_KEY = _TCP_ROUTING&lt;BR /&gt;
FORMAT = allowedEventsGroup  &lt;/P&gt;

&lt;PRE&gt;
&lt;/PRE&gt;

&lt;P&gt;# outputs.conf&lt;BR /&gt;
# ----------------&lt;BR /&gt;
[tcpout]&lt;BR /&gt;
defaultGroup=nullGroup&lt;BR /&gt;
indexAndForward = 0  &lt;/P&gt;

&lt;P&gt;[tcpout:nullGroup]&lt;BR /&gt;
server=0.0.0.0:0000  &lt;/P&gt;

&lt;P&gt;[tcpout:allowedEventsGroup]&lt;BR /&gt;
server=&amp;lt;your_indexing_ip_here&amp;gt;:9997&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2010 07:10:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90697#M18840</guid>
      <dc:creator>maverick</dc:creator>
      <dc:date>2010-11-17T07:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure a Forwarder to filter and send only the events I want?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90698#M18841</link>
      <description>&lt;P&gt;The challenge with only forwarding very specific things is that sometimes we don't know what we'll need until we need it.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;If you're using a LWF you could start by forwarding anything that contains the events you want to index.  On the indexer you would route all of that to the null queue in one transforms and trump that in the second transforms that will include what you're specifically interested in.  &lt;/P&gt;

&lt;P&gt;If your needs are very specific, you could also send them along via a scripted input.  &lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2010 07:37:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90698#M18841</guid>
      <dc:creator>bwooden</dc:creator>
      <dc:date>2010-11-17T07:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure a Forwarder to filter and send only the events I want?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90699#M18842</link>
      <description>&lt;P&gt;Totally agree. It can be very dangerous to whitelist events because you will never know what you are missing. &lt;/P&gt;

&lt;P&gt;However, if you are required to, then whitelisting from the forward side would cut down on network bandwidth.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2010 07:51:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90699#M18842</guid>
      <dc:creator>maverick</dc:creator>
      <dc:date>2010-11-17T07:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure a Forwarder to filter and send only the events I want?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90700#M18843</link>
      <description>&lt;P&gt;Question:  &lt;/P&gt;

&lt;P&gt;If I made configuration changes mentioned by Maverick, how would I send other logs/events to the same indexer.  For example, how would I send DHCP logs, WindowsUpdate logs, WMI stuff?  Will I have to tweak props.conf, transforms.conf, output.conf for every log?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 01:13:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90700#M18843</guid>
      <dc:creator>ageld</dc:creator>
      <dc:date>2011-04-05T01:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure a Forwarder to filter and send only the events I want?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90701#M18844</link>
      <description>&lt;P&gt;Also, which application should I make the changes to props.conf, transforms.conf, and output.conf?  I tried to do it under F:\Program Files\Splunk\etc\apps\SplunkForwarder\, but it did not make a difference.  No events appeared on the idexer.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2011 02:31:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-a-Forwarder-to-filter-and-send-only-the-events/m-p/90701#M18844</guid>
      <dc:creator>ageld</dc:creator>
      <dc:date>2011-04-05T02:31:58Z</dc:date>
    </item>
  </channel>
</rss>

