<?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: Inputs.conf with wildcards in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59924#M11853</link>
    <description>&lt;P&gt;Have you read these two similar questions:&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/answers/2775/regexs-and-windows-paths-in-inputsconf-and-propsconf"&gt;http://splunk-base.splunk.com/answers/2775/regexs-and-windows-paths-in-inputsconf-and-propsconf&lt;/A&gt;&lt;BR /&gt;
&amp;amp;&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/answers/26094/whats-the-syntax-for-monitoring-a-local-windows-directory-or-file"&gt;http://splunk-base.splunk.com/answers/26094/whats-the-syntax-for-monitoring-a-local-windows-directory-or-file&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It probably gets really tricky when you are trying to use the administrative pathing to a different box. Have you considered installing a universal forwarder directly on the box you are trying to monitor files from?&lt;/P&gt;</description>
    <pubDate>Fri, 14 Sep 2012 18:41:28 GMT</pubDate>
    <dc:creator>aholzer</dc:creator>
    <dc:date>2012-09-14T18:41:28Z</dc:date>
    <item>
      <title>Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59916#M11845</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;[monitor://\\njros1bva0597\d$\LogFiles\W3SVC1\*.log]
disabled = false
host = NJROS1BVA0621
alwaysOpenFile = 1
sourcetype = Image Importer Logs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With the stanza above, splunk reports the number of files is 3.  There are only 2 files in the directory!!  Also we can get it to actual index any of the files in the directory.  There are only 2 files in the directory and they both end in .log&lt;/P&gt;

&lt;P&gt;Please help&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2012 23:30:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59916#M11845</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-13T23:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59917#M11846</link>
      <description>&lt;P&gt;This is the stanza&lt;/P&gt;

&lt;P&gt;[monitor://\njros1bva0597\d$\LogFiles\W3SVC1*.log]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
host = NJROS1BVA0621&lt;BR /&gt;
alwaysOpenFile = 1&lt;BR /&gt;
sourcetype = Image Importer Logs&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2012 23:30:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59917#M11846</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-13T23:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59918#M11847</link>
      <description>&lt;P&gt;for some reason the splunkbase is removing the backslashes in the path!!!  Bottom line we want all files ending in .log in the W3SVC1 directory&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2012 23:32:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59918#M11847</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-13T23:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59919#M11848</link>
      <description>&lt;P&gt;we cannot use whitelisting due to another splunk limitation&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2012 23:33:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59919#M11848</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-13T23:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59920#M11849</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm not sure if this is really necessary, but don't you have to escape the backslashes in the monitor stanza?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[monitor://\\njros1bva0597\\d$\\LogFiles\\W3SVC1\\*.log]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Also, you could try to remove the dot after the wildcard, and see if that helps:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[monitor://\\njros1bva0597\\d$\\LogFiles\\W3SVC1\\*log]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Good luck! &lt;BR /&gt;
:-)&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;

&lt;P&gt;Christoph&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2012 09:19:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59920#M11849</guid>
      <dc:creator>cmonig</dc:creator>
      <dc:date>2012-09-14T09:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59921#M11850</link>
      <description>&lt;P&gt;tried this&lt;BR /&gt;
monitor://\njros1bva0597\d$\LogFiles\W3SVC1\*log&lt;/P&gt;

&lt;P&gt;I think the problem is our share d$...i think when everything get converted to regex the dollar sign messes things up but we don't know to fix&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2012 14:03:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59921#M11850</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-14T14:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59922#M11851</link>
      <description>&lt;P&gt;try escaping the dollar sign: \$&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2012 14:09:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59922#M11851</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2012-09-14T14:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59923#M11852</link>
      <description>&lt;P&gt;escaping the $ did not work...didn't even recognize the input&lt;/P&gt;

&lt;P&gt;went back to my original config that was in the question.  Here's some more info from the tailing status&lt;/P&gt;

&lt;P&gt;parent  \njros1bva0597\d$\LogFiles\W3SVC1*.log&lt;BR /&gt;
type    File did not match whitelist '^\\njros1bva0597\d$\LogFiles\W3SVC1\[^\]*.log$'.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2012 18:28:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59923#M11852</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-14T18:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59924#M11853</link>
      <description>&lt;P&gt;Have you read these two similar questions:&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/answers/2775/regexs-and-windows-paths-in-inputsconf-and-propsconf"&gt;http://splunk-base.splunk.com/answers/2775/regexs-and-windows-paths-in-inputsconf-and-propsconf&lt;/A&gt;&lt;BR /&gt;
&amp;amp;&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/answers/26094/whats-the-syntax-for-monitoring-a-local-windows-directory-or-file"&gt;http://splunk-base.splunk.com/answers/26094/whats-the-syntax-for-monitoring-a-local-windows-directory-or-file&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It probably gets really tricky when you are trying to use the administrative pathing to a different box. Have you considered installing a universal forwarder directly on the box you are trying to monitor files from?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2012 18:41:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59924#M11853</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2012-09-14T18:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59925#M11854</link>
      <description>&lt;P&gt;From the &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/data/Specifyinputpathswithwildcards"&gt;manual&lt;/A&gt;: "&lt;STRONG&gt;Warning&lt;/STRONG&gt;: In Windows, you cannot currently use a wildcard at the root level." Which is what you are doing. And to answer &lt;A href="http://splunk-base.splunk.com/users/137409/cmonig"&gt;cmonig&lt;/A&gt;, I believe that the double-backslash \\ is only required in whitelists and blacklists, not the monitor stanza itself. (And you don't necessarily need a backslash in a whitelist, as it is a regular expression.)&lt;/P&gt;

&lt;P&gt;The following should fix the problem:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://\\njros1bva0597\d$\LogFiles\W3SVC1]
disabled = false
host = NJROS1BVA0621
alwaysOpenFile = 1
sourcetype = Image Importer Logs
whitelist=.log$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I don't understand why you can't use whitelists. If you can't, then you are stuck with monitoring everything in the directory or finding another way around this AFAIK.&lt;/P&gt;

&lt;P&gt;I would personally not use a sourcetype with spaces, but that's up to you. Also, the number of files that Splunk is monitoring may also include directories in the path, I think. To see what is actually being monitored, try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$SPLUNK_HOME\bin\splunk list monitor
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And Splunk will give you a list of the files it is monitoring - it may be a longer list than you expect!&lt;/P&gt;

&lt;P&gt;Good move on checking the internal logs for the tailing status.&lt;/P&gt;

&lt;P&gt;Updated: you said in the comments: "I want the ROUTEDB log files to get one source type and UPDATEDB to get another source type.  I don't want or need the remaining 10 files." You can override the sourcetype setting as needed in &lt;CODE&gt;props.conf&lt;/CODE&gt; - more info &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/Bypassautomaticsourcetypeassignment"&gt;here&lt;/A&gt; in the middle of the page at &lt;STRONG&gt;Specify sourcetype for source.&lt;/STRONG&gt; Perhaps this would help you so that you can use a whitelist and not violate the rule about multiple stanzas with the same path.&lt;/P&gt;

&lt;P&gt;If the ultimate problem is the $ in your path name, can you create a link and use it instead? For example, create a link to the d$ directory named d.dollar, and then make the monitor stanza look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://\\njros1bva0597\d.dollar\LogFiles\W3SVC1]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Sep 2012 18:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59925#M11854</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-09-14T18:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59926#M11855</link>
      <description>&lt;P&gt;I don't think I can use whitelists because the Splunk SE guys told me that I couldn't.  &lt;/P&gt;

&lt;P&gt;In the end, I have 20 files in the directory.  5 that are named UPDATEDB-MM-DD-YY.log and 5 that are named ROUTEDB-MM-DD-YY.log.  The remaining 10 are text files and binaries.  &lt;/P&gt;

&lt;P&gt;I want the ROUTEDB log files to get one source type and UPDATEDB to get another source type.  I don't want or need the remaining 10 files.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2012 18:56:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59926#M11855</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-14T18:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59927#M11856</link>
      <description>&lt;P&gt;First, they told me to use whitelists.  But then, based on my experience, you can't have more than 1 monitor with the same path.  Then they told me to use wildcards.  I have been trying to get this simple example going before I tackle the real problem.&lt;/P&gt;

&lt;P&gt;I have confirmed that the $ is the issue.  I just don't know how to fix it.  &lt;/P&gt;

&lt;P&gt;monitor://\njros1bva0597\dshare\LogFiles\W3SVC1*.log&lt;BR /&gt;
or &lt;BR /&gt;
monitor://\njros1bva0597\dshare\LogFiles\W3SVC1\UPDATEDB*.log&lt;/P&gt;

&lt;P&gt;All work just great.&lt;/P&gt;

&lt;P&gt;It's our standard of creating shares like D$ that seems to be the issue.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2012 18:56:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59927#M11856</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-14T18:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59928#M11857</link>
      <description>&lt;P&gt;You are correct - you can't have more than one monitor on the same path. But if there are only text files and binaries in the directory, along with the log files - why would you have more than one monitor stanza with the same path?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2012 19:33:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59928#M11857</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-09-14T19:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs.conf with wildcards</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59929#M11858</link>
      <description>&lt;P&gt;Thanks.  I spoke with them again and we are going with the props.conf file.  They acknowledged that splunk struggles with the $ in the path when you have a wildcard as well.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2012 19:51:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-conf-with-wildcards/m-p/59929#M11858</guid>
      <dc:creator>peter_gianusso</dc:creator>
      <dc:date>2012-09-14T19:51:21Z</dc:date>
    </item>
  </channel>
</rss>

