<?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: Issue with blacklisting service name in inputs.conf file in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Issue-with-blacklisting-service-name-in-inputs-conf-file/m-p/106965#M22487</link>
    <description>&lt;P&gt;Should be like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///tom]
sourcetype = userTom
disable = 0
blacklist = foo.*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;First, the monitor stanzas are URL-like - &lt;CODE&gt;monitor://&lt;/CODE&gt; plus the path.  Your example had only the two slashes, which would have probably put it relative to &lt;CODE&gt;$SPLUNK_HOME&lt;/CODE&gt;.  And I don't think &lt;CODE&gt;$SPLUNK_HOME/tom&lt;/CODE&gt; was what you wanted to monitor.&lt;/P&gt;

&lt;P&gt;Second, you aren't &lt;STRONG&gt;required&lt;/STRONG&gt; to put a filespec in the &lt;CODE&gt;monitor://&lt;/CODE&gt; stanza - the &lt;CODE&gt;*.*&lt;/CODE&gt; is not necessary.  If you do put a filespec, however, you shouldn't expect &lt;CODE&gt;whitelist&lt;/CODE&gt; or &lt;CODE&gt;blacklist&lt;/CODE&gt; to work.  (Internally, Splunk uses &lt;CODE&gt;whitelist&lt;/CODE&gt; and &lt;CODE&gt;blacklist&lt;/CODE&gt; to implement the wildcard specification you give)&lt;/P&gt;

&lt;P&gt;Third, these are regexes, not globbing-style wildcard expansions.  &lt;CODE&gt;foo*&lt;/CODE&gt; means "f, followed by o, followed by zero or more o"  -- so "foo" will match, and so will "fo", and "foooooooooooooooooooo".  To make the glob-syle pattern &lt;CODE&gt;foo*&lt;/CODE&gt; you need to make your regex &lt;CODE&gt;foo.*&lt;/CODE&gt;.  To make the glob-style pattern &lt;CODE&gt;foo.*&lt;/CODE&gt; you need to make your regex &lt;CODE&gt;foo\..*&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Finally, the &lt;CODE&gt;filter&lt;/CODE&gt; stanzas in &lt;CODE&gt;inputs.conf&lt;/CODE&gt; are not used for &lt;CODE&gt;monitor://&lt;/CODE&gt; stanzas, but for &lt;CODE&gt;fschange&lt;/CODE&gt; stanzas.  So, you wouldn't use those unless you were setting up fschange.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Apr 2012 12:40:16 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2012-04-04T12:40:16Z</dc:date>
    <item>
      <title>Issue with blacklisting service name in inputs.conf file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issue-with-blacklisting-service-name-in-inputs-conf-file/m-p/106964#M22486</link>
      <description>&lt;P&gt;I have 6 directories that I'm indexing from&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/tom/
/linda/
/joe/
/time/
/jil/
/sue/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Each of the directories has a number of files in them I'm trying to black list anything in the directory that begins with foo&lt;/P&gt;

&lt;P&gt;The inputs.conf file looks like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://tom/*.*]
sourcetype = userTom
disable = 0
blacklist = .*\/\..*|foo*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and so on&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://sue/*.*]
sourcetype = userSue
disable = 0
blacklist = .*\/\..*|foo*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This does not seem to work.&lt;/P&gt;

&lt;P&gt;I have also look been looking into the filtering of information with inputs.conf.  But cannot find an example that describes how to set this up.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[filter:&amp;lt;filtertype&amp;gt;:&amp;lt;filtername&amp;gt;]
* Define a filter of type &amp;lt;filtertype&amp;gt; and name it &amp;lt;filtername&amp;gt;.
* &amp;lt;filtertype&amp;gt;:
  * Filter types are either 'blacklist' or 'whitelist.' 
  * A whitelist filter processes all file names that match the regex list.
  * A blacklist filter skips all file names that match the regex list.
* &amp;lt;filtername&amp;gt;
  * The filter name is used in the comma-separated list when defining a file system monitor.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help would be great&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2012 18:26:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issue-with-blacklisting-service-name-in-inputs-conf-file/m-p/106964#M22486</guid>
      <dc:creator>fresned</dc:creator>
      <dc:date>2012-04-02T18:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with blacklisting service name in inputs.conf file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issue-with-blacklisting-service-name-in-inputs-conf-file/m-p/106965#M22487</link>
      <description>&lt;P&gt;Should be like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///tom]
sourcetype = userTom
disable = 0
blacklist = foo.*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;First, the monitor stanzas are URL-like - &lt;CODE&gt;monitor://&lt;/CODE&gt; plus the path.  Your example had only the two slashes, which would have probably put it relative to &lt;CODE&gt;$SPLUNK_HOME&lt;/CODE&gt;.  And I don't think &lt;CODE&gt;$SPLUNK_HOME/tom&lt;/CODE&gt; was what you wanted to monitor.&lt;/P&gt;

&lt;P&gt;Second, you aren't &lt;STRONG&gt;required&lt;/STRONG&gt; to put a filespec in the &lt;CODE&gt;monitor://&lt;/CODE&gt; stanza - the &lt;CODE&gt;*.*&lt;/CODE&gt; is not necessary.  If you do put a filespec, however, you shouldn't expect &lt;CODE&gt;whitelist&lt;/CODE&gt; or &lt;CODE&gt;blacklist&lt;/CODE&gt; to work.  (Internally, Splunk uses &lt;CODE&gt;whitelist&lt;/CODE&gt; and &lt;CODE&gt;blacklist&lt;/CODE&gt; to implement the wildcard specification you give)&lt;/P&gt;

&lt;P&gt;Third, these are regexes, not globbing-style wildcard expansions.  &lt;CODE&gt;foo*&lt;/CODE&gt; means "f, followed by o, followed by zero or more o"  -- so "foo" will match, and so will "fo", and "foooooooooooooooooooo".  To make the glob-syle pattern &lt;CODE&gt;foo*&lt;/CODE&gt; you need to make your regex &lt;CODE&gt;foo.*&lt;/CODE&gt;.  To make the glob-style pattern &lt;CODE&gt;foo.*&lt;/CODE&gt; you need to make your regex &lt;CODE&gt;foo\..*&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Finally, the &lt;CODE&gt;filter&lt;/CODE&gt; stanzas in &lt;CODE&gt;inputs.conf&lt;/CODE&gt; are not used for &lt;CODE&gt;monitor://&lt;/CODE&gt; stanzas, but for &lt;CODE&gt;fschange&lt;/CODE&gt; stanzas.  So, you wouldn't use those unless you were setting up fschange.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2012 12:40:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issue-with-blacklisting-service-name-in-inputs-conf-file/m-p/106965#M22487</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-04-04T12:40:16Z</dc:date>
    </item>
  </channel>
</rss>

