<?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 Event Filtering not working in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Event-Filtering-not-working/m-p/16124#M1890</link>
    <description>&lt;P&gt;We are trying to filter events from the Windows Event Log that are pulled using WMI.&lt;/P&gt;

&lt;P&gt;Here is the transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WMInull]
REGEX = (?m)^EventCode=(538|562|571|573|576|577|578|672|680|4634|4658|4672|4673|4674|4690|4772|4776|5156)
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is the props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WMI:WinEventLog:Security]
EXTRACT-db_user = (?i) user '(?P&amp;lt;db_user&amp;gt;[^']*)'
TRANSFORMS-null = WMInull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But if I do a search of the security log and use &lt;CODE&gt;| regex _raw="(?m)^EventCode=(538|562|571|573|576|577|578|672|680|4634|4658|4672|4673|4674|4690|4772|4776|5156)"&lt;/CODE&gt;, I am seeing events that should have been filtered.&lt;/P&gt;

&lt;P&gt;Any idea what the problem is?  It was working prior to the upgrade to 4.x&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jun 2010 00:52:11 GMT</pubDate>
    <dc:creator>jambajuice</dc:creator>
    <dc:date>2010-06-25T00:52:11Z</dc:date>
    <item>
      <title>Event Filtering not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Event-Filtering-not-working/m-p/16124#M1890</link>
      <description>&lt;P&gt;We are trying to filter events from the Windows Event Log that are pulled using WMI.&lt;/P&gt;

&lt;P&gt;Here is the transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WMInull]
REGEX = (?m)^EventCode=(538|562|571|573|576|577|578|672|680|4634|4658|4672|4673|4674|4690|4772|4776|5156)
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is the props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WMI:WinEventLog:Security]
EXTRACT-db_user = (?i) user '(?P&amp;lt;db_user&amp;gt;[^']*)'
TRANSFORMS-null = WMInull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But if I do a search of the security log and use &lt;CODE&gt;| regex _raw="(?m)^EventCode=(538|562|571|573|576|577|578|672|680|4634|4658|4672|4673|4674|4690|4772|4776|5156)"&lt;/CODE&gt;, I am seeing events that should have been filtered.&lt;/P&gt;

&lt;P&gt;Any idea what the problem is?  It was working prior to the upgrade to 4.x&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2010 00:52:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Event-Filtering-not-working/m-p/16124#M1890</guid>
      <dc:creator>jambajuice</dc:creator>
      <dc:date>2010-06-25T00:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Event Filtering not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Event-Filtering-not-working/m-p/16125#M1891</link>
      <description>&lt;P&gt;Is your sourcetype correct?  I'm not familiar with collecting event logs via WMI (which if I understand correctly, is not recommended.)  So if your sourcetype is wrong, then that would certainly cause a problem.&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Update:&lt;/EM&gt;  Based on gkanapathy note.  You could simply use the sourcetype of &lt;CODE&gt;wmi&lt;/CODE&gt;.  That's a lot of overhead if your collecting a fair about of WMI events though. If you use the &lt;CODE&gt;WinEventLog&lt;/CODE&gt; inputs directly (instead of pulling them via WMI), then you could use the sourcetype of &lt;CODE&gt;[WinEventLog:Security]&lt;/CODE&gt; (since the windows event logs are not assigned a sourcetype dynamically like the &lt;CODE&gt;wmi&lt;/CODE&gt; events are) so this would be more efficient because your transformer would run for fewer events.  &lt;/P&gt;

&lt;P&gt;If you have to collect these using WMI, you may also want to consider also making your regex match &lt;CODE&gt;wmi_type=WinEventLog:Security&lt;/CODE&gt; which would prevent your regex from matching against other Application or System logs, but then again that will make the regex-overhead even higher....&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Side note:&lt;/STRONG&gt;  One thing I would certainly suggested is that you update your REGEX to ensure that whatever comes after your code isn't another digit.  For example, you want to block &lt;CODE&gt;538&lt;/CODE&gt; but not necessarily &lt;CODE&gt;5381&lt;/CODE&gt; or &lt;CODE&gt;5389999999&lt;/CODE&gt; (I'm not that familiar with all the different codes here, but it certainly seems like you could be matching more than you want.)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = (?m)^EventCode=(538|562|571|573|576|577|578|672|680|4634|4658|4672|4673|4674|4690|4772|4776|5156)\b
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Jun 2010 01:57:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Event-Filtering-not-working/m-p/16125#M1891</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-06-25T01:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Event Filtering not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Event-Filtering-not-working/m-p/16126#M1892</link>
      <description>&lt;P&gt;I am surprised that it used to work, because a props.conf rule on &lt;CODE&gt;[WMI:WinEventLog:Security]&lt;/CODE&gt; does &lt;EM&gt;not&lt;/EM&gt; get invoked at index time (so TRANSFORMS) will not work. This is because the sourcetype of data collected via WMI is not set until index time, so when rules are selected that one will not work. (It does work for search time rules, e.g., REPORT.) The sourcetype at that point is just &lt;CODE&gt;wmi&lt;/CODE&gt;, and this applies to all WMI-collected data.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2010 02:43:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Event-Filtering-not-working/m-p/16126#M1892</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-06-25T02:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Event Filtering not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Event-Filtering-not-working/m-p/16127#M1893</link>
      <description>&lt;P&gt;Then what is the best practice for filtering events collected with WMI?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2010 02:53:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Event-Filtering-not-working/m-p/16127#M1893</guid>
      <dc:creator>jambajuice</dc:creator>
      <dc:date>2010-06-25T02:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Event Filtering not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Event-Filtering-not-working/m-p/16128#M1894</link>
      <description>&lt;P&gt;You most certainly can filter wmi events.  The method, which is to reference the wmi sourcetype, is discussed in this post:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/questions/3239/try-to-route-certain-wmi-events-to-nullqueue" rel="nofollow"&gt;http://answers.splunk.com/questions/3239/try-to-route-certain-wmi-events-to-nullqueue&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2010 03:21:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Event-Filtering-not-working/m-p/16128#M1894</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2010-06-25T03:21:04Z</dc:date>
    </item>
  </channel>
</rss>

