<?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 How does Splunk use wildcards for inputs in the backend? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-use-wildcards-for-inputs-in-the-backend/m-p/189611#M37774</link>
    <description>&lt;P&gt;&lt;CODE&gt;/var/log/…/apache.log&lt;/CODE&gt; matches the files in Splunk, but through either python or unix CLI, I am unable to perform the operation.&lt;/P&gt;

&lt;P&gt;What/How exactly does Splunk function using wildcards in the backend?&lt;/P&gt;</description>
    <pubDate>Thu, 19 Mar 2015 13:19:21 GMT</pubDate>
    <dc:creator>neelamssantosh</dc:creator>
    <dc:date>2015-03-19T13:19:21Z</dc:date>
    <item>
      <title>How does Splunk use wildcards for inputs in the backend?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-use-wildcards-for-inputs-in-the-backend/m-p/189611#M37774</link>
      <description>&lt;P&gt;&lt;CODE&gt;/var/log/…/apache.log&lt;/CODE&gt; matches the files in Splunk, but through either python or unix CLI, I am unable to perform the operation.&lt;/P&gt;

&lt;P&gt;What/How exactly does Splunk function using wildcards in the backend?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2015 13:19:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-use-wildcards-for-inputs-in-the-backend/m-p/189611#M37774</guid>
      <dc:creator>neelamssantosh</dc:creator>
      <dc:date>2015-03-19T13:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: How does Splunk use wildcards for inputs in the backend?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-use-wildcards-for-inputs-in-the-backend/m-p/189612#M37775</link>
      <description>&lt;P&gt;That is correct - the &lt;CODE&gt;/.../&lt;/CODE&gt; construct is not a part of standard *nix glob patterns.  The best way to explain it is that when you use wildcards in an input stanza, splunk transmogrifies those into whitelist regexes.  So for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/.../apache.log]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;will get transmogrified into something similar to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log]
whitelist=^/var/log/(.*)/apache\.log$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and then this alternate-reality version is processed just like Splunk does any other &lt;CODE&gt;monitor&lt;/CODE&gt; stanza with a whitelist.  Similarly, &lt;CODE&gt;*&lt;/CODE&gt; in a monitor stanza is transmogrified something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/httpd/access*.log]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;becomes&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///var/log/httpd]
whitelist=^/var/log/httpd/access[^/]*\.log$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;These are probably not 100% exact representations of how the translation from glob-like-pattern to regex occurs but they are good examples of the concepts.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Mar 2015 03:38:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-does-Splunk-use-wildcards-for-inputs-in-the-backend/m-p/189612#M37775</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2015-03-22T03:38:15Z</dc:date>
    </item>
  </channel>
</rss>

