<?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 monitor wildcard files recursively in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-monitor-wildcard-files-recursively/m-p/494009#M60784</link>
    <description>&lt;P&gt;may be below inputs can help. let me know if this helps&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/.../*.log]
disabled = false
index = rpi_logs 
sourcetype = linux_logs
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 10 Mar 2020 23:04:02 GMT</pubDate>
    <dc:creator>akshatj2</dc:creator>
    <dc:date>2020-03-10T23:04:02Z</dc:date>
    <item>
      <title>How to monitor wildcard files recursively</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-monitor-wildcard-files-recursively/m-p/494008#M60783</link>
      <description>&lt;P&gt;I want to index all *.log files recursively from &lt;CODE&gt;/var/log&lt;/CODE&gt;&lt;BR /&gt;
I followed this instruction &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.2/Data/Specifyinputpathswithwildcards"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.2/Data/Specifyinputpathswithwildcards&lt;/A&gt;&lt;BR /&gt;
My inputs.conf looks like this:&lt;BR /&gt;
 &lt;CODE&gt;[monitor:///var/log/]&lt;BR /&gt;
whitelist=\.log$ &lt;BR /&gt;
recursive=true &lt;BR /&gt;
disabled = false&lt;BR /&gt;
index = rpi_logs&lt;BR /&gt;
sourcetype = linux_logs&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;It seems to be indexing only &lt;CODE&gt;/var/log/daemon.log&lt;/CODE&gt; and &lt;CODE&gt;var/log/auth.log&lt;/CODE&gt;&lt;BR /&gt;
But I also have log files in &lt;CODE&gt;/var/log/mysql&lt;/CODE&gt; and &lt;CODE&gt;/var/log/nginx&lt;/CODE&gt; directories and those are omitted. What am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 22:01:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-monitor-wildcard-files-recursively/m-p/494008#M60783</guid>
      <dc:creator>signumpl</dc:creator>
      <dc:date>2020-03-10T22:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to monitor wildcard files recursively</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-monitor-wildcard-files-recursively/m-p/494009#M60784</link>
      <description>&lt;P&gt;may be below inputs can help. let me know if this helps&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/.../*.log]
disabled = false
index = rpi_logs 
sourcetype = linux_logs
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Mar 2020 23:04:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-monitor-wildcard-files-recursively/m-p/494009#M60784</guid>
      <dc:creator>akshatj2</dc:creator>
      <dc:date>2020-03-10T23:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to monitor wildcard files recursively</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-monitor-wildcard-files-recursively/m-p/494010#M60785</link>
      <description>&lt;P&gt;please run the command ./splunk list inputstatus to troublehsoot the issue, this command will provide you an output like this:&lt;/P&gt;

&lt;P&gt;this output means the input configuration is not working.&lt;/P&gt;

&lt;P&gt;/var/log/installer/status&lt;BR /&gt;
        parent = /var/log&lt;BR /&gt;
        type = File did not match whitelist '(.log|log$|messages|secure|auth|mesg$|cron$|acpid$|.out)'.&lt;/P&gt;

&lt;P&gt;this output means the file is being properly monitored by splunk&lt;BR /&gt;
    /var/log/installer/syslog&lt;BR /&gt;
        file position = 465885&lt;BR /&gt;
        file size = 465885&lt;BR /&gt;
        parent = /var/log&lt;BR /&gt;
        percent = 100.00&lt;BR /&gt;
        type = finished reading&lt;/P&gt;

&lt;P&gt;It is possible the splunk is not able to read the log files from /var/log/mysql and /var/log/nginx, so I would try something like this:&lt;/P&gt;

&lt;P&gt;[monitor:///var/log/.../] &lt;BR /&gt;
whitelist=.log$ &lt;BR /&gt;
recursive=true &lt;BR /&gt;
disabled = false &lt;BR /&gt;
index = rpi_logs &lt;BR /&gt;
sourcetype = linux_logs&lt;/P&gt;

&lt;P&gt;Note concerning wildcards and monitor:&lt;BR /&gt;
* You can use wildcards to specify your input path for monitored inputs. Use&lt;BR /&gt;
  "..." for recursive directory matching and "&lt;EM&gt;" for wildcard matching in a&lt;BR /&gt;
  single directory segment.&lt;BR /&gt;
* "..." recurses through directories. This means that /foo/.../bar matches&lt;BR /&gt;
  foo/1/bar, foo/1/2/bar, etc.&lt;BR /&gt;
* You can use multiple "..." specifications in a single input path. For&lt;BR /&gt;
  example: /foo/.../bar/...&lt;BR /&gt;
* The asterisk (&lt;/EM&gt;) matches anything in a single path segment; unlike "...", it&lt;BR /&gt;
  does not recurse. For example, /foo/&lt;EM&gt;/bar matches the files&lt;BR /&gt;
  /foo/1/bar, /foo/2/bar, etc. However, it does not match&lt;BR /&gt;
  /foo/bar or /foo/1/2/bar.&lt;BR /&gt;
  A second example: /foo/m*r/bar matches /foo/mr/bar, /foo/mir/bar,&lt;BR /&gt;
  /foo/moor/bar, etc. It does not match /foo/mi/or/bar.&lt;BR /&gt;
* You can combine "&lt;/EM&gt;" and "..." as needed: foo/.../bar/* matches any file in&lt;BR /&gt;
  the bar directory within the specified path.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:36:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-monitor-wildcard-files-recursively/m-p/494010#M60785</guid>
      <dc:creator>ivanreis</dc:creator>
      <dc:date>2020-09-30T04:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to monitor wildcard files recursively</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-monitor-wildcard-files-recursively/m-p/494011#M60786</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/.../*\.log$]
recursive=true
disabled = false 
index = rpi_logs 
sourcetype = linux_logs
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Mar 2020 00:31:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-monitor-wildcard-files-recursively/m-p/494011#M60786</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-11T00:31:55Z</dc:date>
    </item>
  </channel>
</rss>

