<?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: filter events on indexer in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/filter-events-on-indexer/m-p/44870#M10606</link>
    <description>&lt;P&gt;There are a couple of problems with this. &lt;/P&gt;

&lt;P&gt;First the regex in setparsing is wrong. You should start the list of numbers with an open brace and don't need the terminating .*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = (?msi)^EventCode=(552|538|576|528|529)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Next, you have your regex in setnull to match everything. This will send it all to the null queue. Then you pull back (if the regex is fixed) the ones you want. This is inefficient so you want to create a regex to catch only what you want to throw away.&lt;/P&gt;

&lt;P&gt;I would do this as follows:-&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;On the indexer&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLog:Security]
TRANSFORMS-set= setnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = (?msi)^EventCode=(?!(552|538|576|528|529)\b)
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The ?! in this regex is sayng NOT what is in this bracket and the \b is making sure it doesn't match 5221, 5385 etc.&lt;/P&gt;

&lt;P&gt;By the way, the &lt;CODE&gt;FORMAT = indexQueue&lt;/CODE&gt; is telling splunk to put the event back in the indexing queue and it will use whatever index was defined in inputs.conf&lt;/P&gt;

&lt;P&gt;Bob&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2012 13:17:41 GMT</pubDate>
    <dc:creator>BobM</dc:creator>
    <dc:date>2012-01-05T13:17:41Z</dc:date>
    <item>
      <title>filter events on indexer</title>
      <link>https://community.splunk.com/t5/Splunk-Search/filter-events-on-indexer/m-p/44869#M10605</link>
      <description>&lt;P&gt;I want to filter some types of events at my indexer, that are received from several universal forwarders.&lt;/P&gt;

&lt;P&gt;I try something similar like this:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/answers/96/how-do-i-exclude-some-events-from-being-indexed-by-splunk"&gt;http://splunk-base.splunk.com/answers/96/how-do-i-exclude-some-events-from-being-indexed-by-splunk&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;However I'm not receiving any events on my index. &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Am I missing some configuration or
some config file?&lt;/LI&gt;
&lt;LI&gt;How do filter and index only those
events on the regex?&lt;/LI&gt;
&lt;LI&gt;The target index only needs to be on
the univ forwarder inputs.conf file
right?&lt;/LI&gt;
&lt;LI&gt;The dropped events sent to nullQueue are never indexed correct? They are dropped before the index process..?&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Any help is much appreciated. &lt;/P&gt;

&lt;P&gt;My configuration files are the following:&lt;/P&gt;

&lt;P&gt;**&lt;/P&gt;

&lt;H2&gt;INDEXER:&lt;/H2&gt;

&lt;P&gt;**&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;[WinEventLog:Security]&lt;/P&gt;

&lt;P&gt;TRANSFORMS-set= setnull,setparsing&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;[setnull]&lt;/P&gt;

&lt;P&gt;REGEX = .&lt;/P&gt;

&lt;P&gt;DEST_KEY = queue&lt;/P&gt;

&lt;P&gt;FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[setparsing]&lt;/P&gt;

&lt;P&gt;REGEX = (?msi)^EventCode=552|538|576|528|529).*&lt;/P&gt;

&lt;P&gt;DEST_KEY = queue&lt;/P&gt;

&lt;P&gt;FORMAT = indexQueue (I don't fully understand the purpose of this field! Should it have the target index?)&lt;/P&gt;

&lt;H2&gt;Univ. Forwarder&lt;/H2&gt;

&lt;P&gt;&lt;STRONG&gt;inputs.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;[WinEventLog:Security]&lt;/P&gt;

&lt;P&gt;disabled = 0&lt;/P&gt;

&lt;P&gt;index = myIndex&lt;/P&gt;

&lt;P&gt;start_from = oldest&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;outputs.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;[tcpout]&lt;/P&gt;

&lt;P&gt;defaultGroup=(myServer)_9997&lt;/P&gt;

&lt;P&gt;[tcpout:(myServer)_9997]&lt;/P&gt;

&lt;P&gt;server=(myServer):9997&lt;/P&gt;

&lt;P&gt;useACK = true&lt;/P&gt;

&lt;P&gt;[tcpout-server://(myServer):9997]&lt;/P&gt;

&lt;P&gt;useACK = true&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2012 12:21:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/filter-events-on-indexer/m-p/44869#M10605</guid>
      <dc:creator>fernandoandre</dc:creator>
      <dc:date>2012-01-05T12:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: filter events on indexer</title>
      <link>https://community.splunk.com/t5/Splunk-Search/filter-events-on-indexer/m-p/44870#M10606</link>
      <description>&lt;P&gt;There are a couple of problems with this. &lt;/P&gt;

&lt;P&gt;First the regex in setparsing is wrong. You should start the list of numbers with an open brace and don't need the terminating .*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = (?msi)^EventCode=(552|538|576|528|529)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Next, you have your regex in setnull to match everything. This will send it all to the null queue. Then you pull back (if the regex is fixed) the ones you want. This is inefficient so you want to create a regex to catch only what you want to throw away.&lt;/P&gt;

&lt;P&gt;I would do this as follows:-&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;On the indexer&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLog:Security]
TRANSFORMS-set= setnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = (?msi)^EventCode=(?!(552|538|576|528|529)\b)
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The ?! in this regex is sayng NOT what is in this bracket and the \b is making sure it doesn't match 5221, 5385 etc.&lt;/P&gt;

&lt;P&gt;By the way, the &lt;CODE&gt;FORMAT = indexQueue&lt;/CODE&gt; is telling splunk to put the event back in the indexing queue and it will use whatever index was defined in inputs.conf&lt;/P&gt;

&lt;P&gt;Bob&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2012 13:17:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/filter-events-on-indexer/m-p/44870#M10606</guid>
      <dc:creator>BobM</dc:creator>
      <dc:date>2012-01-05T13:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: filter events on indexer</title>
      <link>https://community.splunk.com/t5/Splunk-Search/filter-events-on-indexer/m-p/44871#M10607</link>
      <description>&lt;P&gt;I have understand more clearly the mechanism with your explanation than with documentation and other posts.&lt;/P&gt;

&lt;P&gt;I have tested for 1hour now and it works perfectly. &lt;/P&gt;

&lt;P&gt;Thank you for your assistance.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2012 16:08:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/filter-events-on-indexer/m-p/44871#M10607</guid>
      <dc:creator>fernandoandre</dc:creator>
      <dc:date>2012-01-05T16:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: filter events on indexer</title>
      <link>https://community.splunk.com/t5/Splunk-Search/filter-events-on-indexer/m-p/44872#M10608</link>
      <description>&lt;P&gt;Hi ,&lt;BR /&gt;
I am trying to nullify the windows event log which are of "type=Information" and i want only the events having errors and warnings.&lt;BR /&gt;
i am not able to achieve kindly help .&lt;BR /&gt;
I am using below:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;P&gt;[WinEventLog:Application]&lt;BR /&gt;
 TRANSFORMS-set= setnull&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;P&gt;[setnull]&lt;BR /&gt;
 REGEX = "Type=Information"&lt;BR /&gt;
 DEST_KEY = queue&lt;BR /&gt;
 FORMAT = nullQueue&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 07:41:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/filter-events-on-indexer/m-p/44872#M10608</guid>
      <dc:creator>amit2301</dc:creator>
      <dc:date>2017-09-26T07:41:52Z</dc:date>
    </item>
  </channel>
</rss>

