<?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 Filtering WMI events on heavy forwarder in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-WMI-events-on-heavy-forwarder/m-p/568678#M100909</link>
    <description>&lt;P&gt;Yes, I know that filtering was discussed many times here but my case is slightly different.&lt;/P&gt;&lt;P&gt;I have a UF pulling events using WMI. It then pushes the events to upstream HFs.&lt;/P&gt;&lt;P&gt;On the HFs I tried to do filtering similarily to &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.2/Forwarding/Routeandfilterdatad#Filter_WMI_and_Event_Log_events" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.2/Forwarding/Routeandfilterdatad#Filter_WMI_and_Event_Log_events&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But in my case there are two differences:&lt;/P&gt;&lt;P&gt;1) I didn't want to filter out particular events. I wanted to filter out everything, just keep two kinds of events. Seems easy - just do a default transform with REGEX=. to set queue to nullQueue and then just match the ones you want to index and set queue to indexQueue. Well, it doesn't work. Maybe because:&lt;/P&gt;&lt;P&gt;2) I didn't want to apply this to the whole sourcetype. And here's where I suspect something might have gone wrong because if it was just that my transforms are bad, the default one sending to the nullQueue should work. But it seems that they don't work at all.&lt;/P&gt;&lt;P&gt;My definitions:&lt;/P&gt;&lt;P&gt;props.conf:&lt;/P&gt;&lt;PRE&gt;[host::TEST...]&lt;BR /&gt;TRANSFORMS-routing = TEST_default_drop,TEST_index&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;(the hosts I'm getting the data from are called TEST01.domain.com, TEST02.domain.com and so on; I already tried host::TEST*.domain.com)&lt;/P&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;PRE&gt;[TEST_default_drop]&lt;BR /&gt;REGEX=.&lt;BR /&gt;DEST_KEY=queue&lt;BR /&gt;FORMAT=nullQueue&lt;BR /&gt;&lt;BR /&gt;[TEST_index]&lt;BR /&gt;REGEX=(?m)^EventCode=(103|104)&lt;BR /&gt;DEST_KEY=queue&lt;BR /&gt;FORMAT=indexQueue&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Everything seems to be reasonably well, but it doesn't work - I'm getting all data in my index - no filtering at all.&lt;/P&gt;&lt;P&gt;I wouldn't want to configure filtering for the whole sourcetype because I might use WMI in the future for other things and this particular filtering is only for this one kind of sources.&lt;/P&gt;&lt;P&gt;Does UF set host field to something other than I'm expecting? Can I debug it somehow reasonably? (the UF is kinda a production one in general so it'd not be wise to turn fully blown debug of everything on it on)&lt;/P&gt;</description>
    <pubDate>Tue, 28 Sep 2021 09:30:46 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2021-09-28T09:30:46Z</dc:date>
    <item>
      <title>Filtering WMI events on heavy forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-WMI-events-on-heavy-forwarder/m-p/568678#M100909</link>
      <description>&lt;P&gt;Yes, I know that filtering was discussed many times here but my case is slightly different.&lt;/P&gt;&lt;P&gt;I have a UF pulling events using WMI. It then pushes the events to upstream HFs.&lt;/P&gt;&lt;P&gt;On the HFs I tried to do filtering similarily to &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.2/Forwarding/Routeandfilterdatad#Filter_WMI_and_Event_Log_events" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.2/Forwarding/Routeandfilterdatad#Filter_WMI_and_Event_Log_events&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But in my case there are two differences:&lt;/P&gt;&lt;P&gt;1) I didn't want to filter out particular events. I wanted to filter out everything, just keep two kinds of events. Seems easy - just do a default transform with REGEX=. to set queue to nullQueue and then just match the ones you want to index and set queue to indexQueue. Well, it doesn't work. Maybe because:&lt;/P&gt;&lt;P&gt;2) I didn't want to apply this to the whole sourcetype. And here's where I suspect something might have gone wrong because if it was just that my transforms are bad, the default one sending to the nullQueue should work. But it seems that they don't work at all.&lt;/P&gt;&lt;P&gt;My definitions:&lt;/P&gt;&lt;P&gt;props.conf:&lt;/P&gt;&lt;PRE&gt;[host::TEST...]&lt;BR /&gt;TRANSFORMS-routing = TEST_default_drop,TEST_index&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;(the hosts I'm getting the data from are called TEST01.domain.com, TEST02.domain.com and so on; I already tried host::TEST*.domain.com)&lt;/P&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;PRE&gt;[TEST_default_drop]&lt;BR /&gt;REGEX=.&lt;BR /&gt;DEST_KEY=queue&lt;BR /&gt;FORMAT=nullQueue&lt;BR /&gt;&lt;BR /&gt;[TEST_index]&lt;BR /&gt;REGEX=(?m)^EventCode=(103|104)&lt;BR /&gt;DEST_KEY=queue&lt;BR /&gt;FORMAT=indexQueue&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Everything seems to be reasonably well, but it doesn't work - I'm getting all data in my index - no filtering at all.&lt;/P&gt;&lt;P&gt;I wouldn't want to configure filtering for the whole sourcetype because I might use WMI in the future for other things and this particular filtering is only for this one kind of sources.&lt;/P&gt;&lt;P&gt;Does UF set host field to something other than I'm expecting? Can I debug it somehow reasonably? (the UF is kinda a production one in general so it'd not be wise to turn fully blown debug of everything on it on)&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 09:30:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-WMI-events-on-heavy-forwarder/m-p/568678#M100909</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-09-28T09:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering WMI events on heavy forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-WMI-events-on-heavy-forwarder/m-p/568702#M100911</link>
      <description>&lt;P&gt;OK. It seems that - as I somehow suspected - the issue was with the host field.&lt;/P&gt;&lt;P&gt;Apparently the host field is getting ingested as the hostname of the UF host (since I'm using the same host for other sources I couldn't just filter all events by this hostname), not as the source systems hostnames. Apparently the TA for Windows app rewrites the host field in search time.&lt;/P&gt;&lt;P&gt;So I had to define props for whole WMI:WinEventLog:Application sourcetype and do some ridiculous regex matching like:&lt;/P&gt;&lt;PRE&gt;[SPE_default_drop]&lt;BR /&gt;REGEX=(?m)^ComputerName=TEST\d{2}.domain.com&lt;BR /&gt;DEST_KEY=queue&lt;BR /&gt;FORMAT=nullQueue&lt;BR /&gt;
[SPE_index]&lt;BR /&gt;REGEX=(?s)^EventCode=(103|104).*ComputerName=TEST\d{2}.domain.com&lt;BR /&gt;DEST_KEY=queue&lt;BR /&gt;FORMAT=indexQueue&lt;/PRE&gt;&lt;P&gt;Luckily, the WMI-pulled events seem to have the fields always in the same order so I can match EventCode.*ComputerName&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 12:06:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-WMI-events-on-heavy-forwarder/m-p/568702#M100911</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-09-28T12:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering WMI events on heavy forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filtering-WMI-events-on-heavy-forwarder/m-p/568717#M100912</link>
      <description>&lt;P&gt;Hmm... interesting. Because the regex seems to be matching properly i regex101 but doesn't seem to match on the HF. Needs investigating.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 12:52:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filtering-WMI-events-on-heavy-forwarder/m-p/568717#M100912</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-09-28T12:52:54Z</dc:date>
    </item>
  </channel>
</rss>

