<?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: Can't get filter to work on windows in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82643#M17138</link>
    <description>&lt;P&gt;I tried these below and couldn't get it to work:&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
  [source::c:\a\]&lt;BR /&gt;
  TRANSFORMS-set=sco_setnull,sco_setparsing&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
  [source::c:\\a\\]&lt;BR /&gt;
  TRANSFORMS-set=sco_setnull,sco_setparsing&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
  [source::c:\a\d.log]&lt;BR /&gt;
  TRANSFORMS-set=sco_setnull,sco_setparsing&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
  [source::c:\\a\\d.log]&lt;BR /&gt;
  TRANSFORMS-set=sco_setnull,sco_setparsing&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 13:39:24 GMT</pubDate>
    <dc:creator>oilmouse</dc:creator>
    <dc:date>2020-09-28T13:39:24Z</dc:date>
    <item>
      <title>Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82637#M17132</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;Hello,

I have a test script that writes out hello_d01 to hello_d10 every 5 seconds... for instance:

16:04:14.36 hello_d01
16:04:14.36 hello_d02
16:04:14.36 hello_d03
16:04:14.36 hello_d04
16:04:14.36 hello_d05
16:04:14.36 hello_d06
16:04:14.36 hello_d07
16:04:14.36 hello_d08
16:04:14.36 hello_d09
16:04:14.36 hello_d10

A splunk forwarder is setup to feed this log file to the indexer.

On the indexer, I have the following props.conf and transforms.conf, and I only want to keep the hello_d03 and hello_d04 events:

props.conf
  [source::c:\\a\\]
  TRANSFORMS-set=sco_setnull,sco_setparsing

transforms.conf
  [sco_setnull]
  REGEX = .
  DEST_KEY = queue
  FORMAT = nullQueue

  [sco_setparsing]
  REGEX = (hello_d03|hello_d04)
  DEST_KEY = queue
  FORMAT = indexQueue


Upon splunkd restart, I'm still seeing all hello_d01 to hello_d10 events as if there were no props.conf and transforms.conf.

What am I missing please?


Thanks.


Cheers,
Jack
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Apr 2013 20:23:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82637#M17132</guid>
      <dc:creator>oilmouse</dc:creator>
      <dc:date>2013-04-02T20:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82638#M17133</link>
      <description>&lt;P&gt;whats the source on the events you recieve ? c:\a\ seems a bit strange ...&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2013 20:28:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82638#M17133</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-04-02T20:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82639#M17134</link>
      <description>&lt;P&gt;Hi oilmouse,&lt;/P&gt;

&lt;P&gt;Based on the assumption that you are using a Universal Forwarder from the tags you've used - if you have got a heavy forwarder I apologize - however, you require a Heavy Forwarder to route or filter data at the event level. Please see the following extract from the documentation:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Important: Only heavy forwarders can route or filter data at the event level. Universal forwarders and light forwarders do not have the ability to inspect individual events, but they can still forward data based on a data stream's host, source, or source type. They can also route based on the data's input stanza, as described below, in the subtopic, "Route inputs to specific indexers based on the data's input".
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ref: &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/Deploy/Routeandfilterdatad"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/Deploy/Routeandfilterdatad&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2013 20:37:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82639#M17134</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2013-04-02T20:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82640#M17135</link>
      <description>&lt;P&gt;The source is c:\a\d.log&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2013 20:45:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82640#M17135</guid>
      <dc:creator>oilmouse</dc:creator>
      <dc:date>2013-04-02T20:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82641#M17136</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;BR /&gt;
My goal is to set up an universal forwarder that forwards everything, and let the indexer does the event filter and discards unwanted events.&lt;BR /&gt;
Is this scenario supported please?  And do I have the right setting in the config files please?&lt;BR /&gt;
Thanks.&lt;BR /&gt;
Cheers,&lt;BR /&gt;
Jack&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2013 20:46:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82641#M17136</guid>
      <dc:creator>oilmouse</dc:creator>
      <dc:date>2013-04-02T20:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82642#M17137</link>
      <description>&lt;P&gt;your source filter in props.conf doesnt match that.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2013 00:13:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82642#M17137</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-04-03T00:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82643#M17138</link>
      <description>&lt;P&gt;I tried these below and couldn't get it to work:&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
  [source::c:\a\]&lt;BR /&gt;
  TRANSFORMS-set=sco_setnull,sco_setparsing&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
  [source::c:\\a\\]&lt;BR /&gt;
  TRANSFORMS-set=sco_setnull,sco_setparsing&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
  [source::c:\a\d.log]&lt;BR /&gt;
  TRANSFORMS-set=sco_setnull,sco_setparsing&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
  [source::c:\\a\\d.log]&lt;BR /&gt;
  TRANSFORMS-set=sco_setnull,sco_setparsing&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:39:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82643#M17138</guid>
      <dc:creator>oilmouse</dc:creator>
      <dc:date>2020-09-28T13:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82644#M17139</link>
      <description>&lt;P&gt;I suggest that you use the &lt;CODE&gt;sourcetype&lt;/CODE&gt; of the data instead of the &lt;CODE&gt;source&lt;/CODE&gt;. Removes one level of confusion regarding forward/backslashes and the need of escaping them.&lt;/P&gt;

&lt;P&gt;In your &lt;CODE&gt;inputs.conf&lt;/CODE&gt; you probably have a &lt;CODE&gt;[monitor://c:\a\d.log]&lt;/CODE&gt; or similar. Underneath that you should specify a sourcetype, &lt;CODE&gt;sourcetype=blah&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Then you can use that (&lt;CODE&gt;[blah]&lt;/CODE&gt;) in your &lt;CODE&gt;props.conf&lt;/CODE&gt; instead of &lt;CODE&gt;[source::something_with_slashes]&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;NB: you don't have to create the sourcetype - splunk will already have created one for you (probably based off the file name).&lt;BR /&gt;
/k&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2013 08:45:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82644#M17139</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-04-03T08:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82645#M17140</link>
      <description>&lt;P&gt;I've updated my forwarder's inputs.conf and added sourcetype=dlog&lt;/P&gt;

&lt;P&gt;In my props.conf, I now have:&lt;BR /&gt;
  [dlog]&lt;BR /&gt;
  TRANSFORMS-set=sco_setnull,sco_setparsing&lt;/P&gt;

&lt;P&gt;Unfortunately it is still not working.&lt;/P&gt;

&lt;P&gt;Any more clue please?  Is there a way to verify transforms.conf please?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
Jack&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:39:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82645#M17140</guid>
      <dc:creator>oilmouse</dc:creator>
      <dc:date>2020-09-28T13:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82646#M17141</link>
      <description>&lt;P&gt;I changed my test environment such that there is now no forwarder involved.  It is now using Files &amp;amp; Directories Data Input.&lt;/P&gt;

&lt;P&gt;It is still not working so I believe the problem is in props.conf and transforms.conf.&lt;/P&gt;

&lt;P&gt;Any idea on how to debug this is appreciated.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
Jack&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2013 16:46:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82646#M17141</guid>
      <dc:creator>oilmouse</dc:creator>
      <dc:date>2013-04-03T16:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82647#M17142</link>
      <description>&lt;P&gt;The events you are seeing are not the old events, right? You know that this will not alter anything that has already been indexed. &lt;/P&gt;

&lt;P&gt;Well, this was probably not news to you, but I thought I'd mention it...&lt;BR /&gt;
/k&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2013 21:18:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82647#M17142</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-04-04T21:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82648#M17143</link>
      <description>&lt;P&gt;Not sure where you stand on this but it showed up in the weekly newsletter. &lt;/P&gt;

&lt;P&gt;The way I would probably try to tackle this is with a forwarder's input.conf file something along the lines of:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor::&amp;lt;path&amp;gt;]
whitelist = (d03|d04)
index = yourIndex
sourcetype = yourSourceType
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, you've indicated you simply want to forwarder it all and let the indexer deal with it. I had more stuff written out but realized as I was looking at some documentation that turns out to be the same one MHibbin references above that your example lines up with the example given there. Don't know why it wouldn't be working other than perhaps your source:: path might be off just a touch perhaps. Hopefully someone else will chime in.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2013 12:25:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82648#M17143</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2013-04-10T12:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get filter to work on windows</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82649#M17144</link>
      <description>&lt;P&gt;If you are collecting data from a Universal Forwarder and want to filter at the indexer level, the following should work.&lt;/P&gt;

&lt;H4&gt;# ON UNIVERSAL FORWARDER&lt;/H4&gt;

&lt;P&gt;inputs.conf&lt;BR /&gt;
[monitor://c:\program files\directory\log.txt]&lt;BR /&gt;
sourcetype = xyz&lt;BR /&gt;
index = abc&lt;/P&gt;

&lt;H4&gt;# ON INDEXER&lt;/H4&gt;

&lt;P&gt;# props.conf&lt;BR /&gt;
# USING SOURCETYPE STANZA&lt;BR /&gt;
[xyz]&lt;BR /&gt;
TRANSFORMS-set= sco_setnull,sco_setparsing&lt;/P&gt;

&lt;P&gt;# transforms.conf&lt;BR /&gt;
# SENDS EVERYTHING TO NULLQUEUE FIRST&lt;BR /&gt;
[sco_setnull]&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;# INDEX EVENTS THAT CONTAIN REGEX&lt;BR /&gt;
[sco_setparsing]&lt;BR /&gt;
REGEX = (hello_d03|hello_d04)&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = indexQueue&lt;/P&gt;

&lt;P&gt;Make sure you are not sending from a full forwarder where parsing might be done. Also make sure you do not have competing sourcetype or source stanzas on the same data source.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:42:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-t-get-filter-to-work-on-windows/m-p/82649#M17144</guid>
      <dc:creator>msettipane</dc:creator>
      <dc:date>2020-09-28T13:42:33Z</dc:date>
    </item>
  </channel>
</rss>

