<?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: Monitor by File Name Only in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-by-File-Name-Only/m-p/66677#M13402</link>
    <description>&lt;P&gt;Hi We are looking to get similar info for all .csv files in a specific folder and not the actual content of the files.&lt;BR /&gt;
ver 6.1.3&lt;BR /&gt;
I did not quite get the changes using fschange or the query above....&lt;BR /&gt;
Thanks for looking into this.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Aug 2015 00:23:03 GMT</pubDate>
    <dc:creator>athorat</dc:creator>
    <dc:date>2015-08-13T00:23:03Z</dc:date>
    <item>
      <title>Monitor by File Name Only</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-by-File-Name-Only/m-p/66673#M13398</link>
      <description>&lt;P&gt;Hi,
I would like to monitor all the web.config files on my machine and then forward the results to a Splunk receiver.
I have tried creating a file monitoring data input of:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://.../web.config]
disabled = false
sourcetype = webconfig

[monitor://...]
disabled = false
sourcetype = webconfig
whitelist = web.config
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But nothing seems to work. Its probably unlikely that something like this would work because of the overhead of searching in all directories, but I was hoping Splunk would be able to. Maybe search all directories once a day and memorize the location of the other web.config files.
Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2010 02:50:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-by-File-Name-Only/m-p/66673#M13398</guid>
      <dc:creator>gallantalex</dc:creator>
      <dc:date>2010-10-08T02:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor by File Name Only</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-by-File-Name-Only/m-p/66674#M13399</link>
      <description>&lt;P&gt;As you say, searching across all directories involves a lot of overhead. Even if it would work, it's best avoided.&lt;/P&gt;

&lt;P&gt;Also, note that when you start with ..., you are not really providing a root for the search to begin. Normally a monitor stanza is going to start with a drive letter (I'm assuming Windows based on your filename). I doubt very much that Splunk will enumerate all filesystems just for the sake of fulfilling a wildcard.&lt;/P&gt;

&lt;P&gt;Your best bet would be a happy middle ground. Try to determine the directories where &lt;CODE&gt;web.config&lt;/CODE&gt; is likely to be located, and then create multiple inputs accordingly.&lt;/P&gt;

&lt;P&gt;If you are not already aware, remember that you can use &lt;CODE&gt;splunk list monitor&lt;/CODE&gt; from the command line to see which files Splunk has found to monitor.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2010 06:30:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-by-File-Name-Only/m-p/66674#M13399</guid>
      <dc:creator>southeringtonp</dc:creator>
      <dc:date>2010-10-08T06:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor by File Name Only</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-by-File-Name-Only/m-p/66675#M13400</link>
      <description>&lt;P&gt;Thanks, I figured that was the case. Also the splunk list monitor command was very helpful.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2010 06:48:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-by-File-Name-Only/m-p/66675#M13400</guid>
      <dc:creator>gallantalex</dc:creator>
      <dc:date>2010-10-08T06:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor by File Name Only</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-by-File-Name-Only/m-p/66676#M13401</link>
      <description>&lt;P&gt;Sounds like you are looking for the &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Crawl" rel="nofollow"&gt;crawl&lt;/A&gt; command.  You can use this as part of a scheduled search (run it daily to monthly, depending on how often new files could show up).  The &lt;CODE&gt;crawl&lt;/CODE&gt; command will scan your directory and look for potential log files.&lt;/P&gt;

&lt;P&gt;Something like this could do the trick:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| crawl root="/var/log;/opt/log" | search isfile=True source="*/web.config" NOT status="added" | input add
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;NOTE:&lt;/STRONG&gt;  You should take the "&lt;CODE&gt;| input add&lt;/CODE&gt;" off the end until your confident that the search is going to do what you want.&lt;/P&gt;

&lt;P&gt;You may need to update &lt;CODE&gt;crawl.conf&lt;/CODE&gt;, since it looks that &lt;CODE&gt;bad_extensions_list&lt;/CODE&gt; includes "config" which would prevent this file from showing up.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2010 21:18:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-by-File-Name-Only/m-p/66676#M13401</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-10-08T21:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor by File Name Only</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitor-by-File-Name-Only/m-p/66677#M13402</link>
      <description>&lt;P&gt;Hi We are looking to get similar info for all .csv files in a specific folder and not the actual content of the files.&lt;BR /&gt;
ver 6.1.3&lt;BR /&gt;
I did not quite get the changes using fschange or the query above....&lt;BR /&gt;
Thanks for looking into this.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2015 00:23:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitor-by-File-Name-Only/m-p/66677#M13402</guid>
      <dc:creator>athorat</dc:creator>
      <dc:date>2015-08-13T00:23:03Z</dc:date>
    </item>
  </channel>
</rss>

