<?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: How to filter events containing the string &amp;quot;desktop$&amp;quot; from being indexed? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-events-containing-the-string-quot-desktop-quot/m-p/125678#M25914</link>
    <description>&lt;P&gt;You know I think that might have done it, and I modified the props.conf to be&lt;BR /&gt;
[host::] &lt;/P&gt;

&lt;P&gt;that way the indexer should only be concerned about that one forwarder correct?&lt;/P&gt;

&lt;P&gt;Also what if I wanted to add a couple more strings to the excluded search such as IPC$ and usr would I just edit the transforms like this?&lt;BR /&gt;
REGEX=(?s)desktop\$,(?s)IPC\$,(?s)usr&lt;BR /&gt;
or do I not need the (?s) between each comma? I thinks it's comma that separates it?&lt;/P&gt;</description>
    <pubDate>Wed, 04 Feb 2015 19:20:28 GMT</pubDate>
    <dc:creator>jttuman</dc:creator>
    <dc:date>2015-02-04T19:20:28Z</dc:date>
    <item>
      <title>How to filter events containing the string "desktop$" from being indexed?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-events-containing-the-string-quot-desktop-quot/m-p/125676#M25912</link>
      <description>&lt;P&gt;Using folder redirection on a server is creating nearly a quarter million events per hour being forwarded, I want some of the event codes for other shares to be logged, but not specific ones so is there any way to filter events that contain the string "desktop$" from being indexed?  Currently on the indexer I've made the props.conf and transforms.conf in %splunkhome%/etc/system/local&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
[default]&lt;BR /&gt;
TRANSFORMS-remove_events=wminull&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
[wminull]&lt;BR /&gt;
REGEX=(?s)desktop$&lt;BR /&gt;
DEST_KEY=queue&lt;BR /&gt;
FORMAT=nullQueue&lt;/P&gt;

&lt;P&gt;but that doesn't seem to be working&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2015 18:33:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-events-containing-the-string-quot-desktop-quot/m-p/125676#M25912</guid>
      <dc:creator>jttuman</dc:creator>
      <dc:date>2015-02-03T18:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter events containing the string "desktop$" from being indexed?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-events-containing-the-string-quot-desktop-quot/m-p/125677#M25913</link>
      <description>&lt;P&gt;Your regular expression contains a special character &lt;CODE&gt;desktop$&lt;/CODE&gt; means "Find the word desktop at the end of a line".&lt;/P&gt;

&lt;P&gt;I think you may want this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=(?s)desktop\$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also remember that regular expressions are case-sensitive. &lt;/P&gt;

&lt;P&gt;Finally, by putting the TRANSFORMS- in the [default] stanza of props.conf, you are forcing Splunk to evaluate this regular expression for &lt;STRONG&gt;every event&lt;/STRONG&gt; that arrives at the indexer. This is horribly inefficient.  I would suggest that you use a sourcetype stanza of some sort instead. For example&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[win*]
TRANSFORMS-remove_events=wminull
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Feb 2015 18:50:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-events-containing-the-string-quot-desktop-quot/m-p/125677#M25913</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-02-04T18:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter events containing the string "desktop$" from being indexed?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-events-containing-the-string-quot-desktop-quot/m-p/125678#M25914</link>
      <description>&lt;P&gt;You know I think that might have done it, and I modified the props.conf to be&lt;BR /&gt;
[host::] &lt;/P&gt;

&lt;P&gt;that way the indexer should only be concerned about that one forwarder correct?&lt;/P&gt;

&lt;P&gt;Also what if I wanted to add a couple more strings to the excluded search such as IPC$ and usr would I just edit the transforms like this?&lt;BR /&gt;
REGEX=(?s)desktop\$,(?s)IPC\$,(?s)usr&lt;BR /&gt;
or do I not need the (?s) between each comma? I thinks it's comma that separates it?&lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 19:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-events-containing-the-string-quot-desktop-quot/m-p/125678#M25914</guid>
      <dc:creator>jttuman</dc:creator>
      <dc:date>2015-02-04T19:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter events containing the string "desktop$" from being indexed?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-events-containing-the-string-quot-desktop-quot/m-p/125679#M25915</link>
      <description>&lt;P&gt;Yes, if the data is coming as "myServer" then &lt;CODE&gt;[host::myServer]&lt;/CODE&gt; will work great.&lt;/P&gt;

&lt;P&gt;In regular expressions, alternation is &lt;CODE&gt;|&lt;/CODE&gt;, so you could do this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=(?s)desktop\$|IPC\$|usr
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You only need the &lt;CODE&gt;(?s)&lt;/CODE&gt; once, as it applies to the whole regular expression. Be aware that Splunk uses &lt;EM&gt;unanchored&lt;/EM&gt; regular expressions. That means that if splunk finds one of the strings "desktop$" or "IPC$" or "usr" &lt;STRONG&gt;anywhere&lt;/STRONG&gt; in the event, the event will be dropped.&lt;/P&gt;

&lt;P&gt;If you are going to be writing a lot of regular expressions, you might want to consider picking up a tool, tutorial or reference. There is a brief tutorial/description in the Splunk documentation &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Knowledge/AboutSplunkregularexpressions"&gt;here&lt;/A&gt;, but you can find tons of resources online. &lt;/P&gt;</description>
      <pubDate>Wed, 04 Feb 2015 21:01:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-filter-events-containing-the-string-quot-desktop-quot/m-p/125679#M25915</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-02-04T21:01:06Z</dc:date>
    </item>
  </channel>
</rss>

