<?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: Forwarder props.conf [source::] stanza in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50276#M9557</link>
    <description>&lt;P&gt;Instead of using the *.log, use the whitelist and do not escape the parenthesis.  I also found no need to escape the backslashes in the path. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::C:\Program Files (x86)\Application\Application Logs\Logs\]
sourcetype = custom_sourcetype
whitelist = \.log$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This whitelist will only match files with .log at the very end.  So its not going to grab other stuff like blah.log.bak remove the $ to get files with stuff past the .log.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Oct 2012 14:48:27 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2012-10-29T14:48:27Z</dc:date>
    <item>
      <title>Forwarder props.conf [source::] stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50270#M9551</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;On my forwarder, at $SPLUNK_HOME/etc/system/local/inputs.conf, I have a monitor configured:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://C:\Program Files (x86)\Application\Application Logs\Logs]
disabled = 0
whitelist = (log$)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can see from my indexer that the log files I expect to be indexed are there.&lt;/P&gt;

&lt;P&gt;I want to adjust the sourcetype for that particular source, so I configured $SPLUNK_HOME/etc/system/local/props.conf as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::C:\\Program Files (x86)\\Application\\Application Logs\\Logs\\*.log]
sourcetype = custom_sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, that stanza does not seem to work. After playing around, I managed to find the following stanza below which works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::...\\Logs\\*.log]
sourcetype = custom_sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Could someone please tell me why? Do spaces, or parentheses in the source file name need to be escaped somehow?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2012 05:26:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50270#M9551</guid>
      <dc:creator>roychen</dc:creator>
      <dc:date>2012-09-04T05:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder props.conf [source::] stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50271#M9552</link>
      <description>&lt;P&gt;Hi roychen,&lt;/P&gt;

&lt;P&gt;Yes, the parentheses need to be escaped. In the &lt;CODE&gt;source::&lt;/CODE&gt; stanza in &lt;CODE&gt;props.conf&lt;/CODE&gt; the parentheses limit the scope of the alternation operator &lt;CODE&gt;|&lt;/CODE&gt;. Try using &lt;CODE&gt;\(&lt;/CODE&gt; and &lt;CODE&gt;\)&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2012 07:40:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50271#M9552</guid>
      <dc:creator>echalex</dc:creator>
      <dc:date>2012-09-04T07:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder props.conf [source::] stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50272#M9553</link>
      <description>&lt;P&gt;Hello echalex,&lt;/P&gt;

&lt;P&gt;It seems even escaping the parentheses with \ doesn't work.&lt;/P&gt;

&lt;P&gt;My stanza was:&lt;/P&gt;

&lt;P&gt;C:\\Program Files \(x86\)\\Application\\Application Logs\\Logs\\filename.log&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2012 08:56:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50272#M9553</guid>
      <dc:creator>roychen</dc:creator>
      <dc:date>2012-09-04T08:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder props.conf [source::] stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50273#M9554</link>
      <description>&lt;P&gt;Hi roychen,&lt;BR /&gt;
Unfortunately I'm not very familiar with Windows or running Splunk on it. However, looking at the &lt;CODE&gt;props.conf&lt;/CODE&gt;-files coming with Splunk, I see that most of the &lt;CODE&gt;source::&lt;/CODE&gt; stanzas seem to start with three dots (&lt;CODE&gt;...&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;Perhaps you could try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::.../C:\\Program Files \(x86\)\\Application\\Application Logs\\Logs\\filename.log]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or even (with or without that first slash after the &lt;CODE&gt;...&lt;/CODE&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::.../\\Program Files \(x86\)\\Application\\Application Logs\\Logs\\filename.log]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Sep 2012 11:24:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50273#M9554</guid>
      <dc:creator>echalex</dc:creator>
      <dc:date>2012-09-04T11:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder props.conf [source::] stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50274#M9555</link>
      <description>&lt;P&gt;Hi echalex,&lt;/P&gt;

&lt;P&gt;I believe the three periods ... means to recurse through directories until the match is met.&lt;/P&gt;

&lt;P&gt;Windows paths still need to be specified with the backslash \, or \ in the case of props.conf, rather than the slash /.&lt;/P&gt;

&lt;P&gt;Still, thank you for your efforts! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2012 05:37:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50274#M9555</guid>
      <dc:creator>roychen</dc:creator>
      <dc:date>2012-09-05T05:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder props.conf [source::] stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50275#M9556</link>
      <description>&lt;P&gt;Hi roychen,&lt;/P&gt;

&lt;P&gt;Yes, the three dots mean "any path". Did you try using the three dots with or without that one slash as I suggested? Basically, since you were succesful with your second example, I think you could be lucky using the full path, but replacing C: with the dots.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2012 07:17:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50275#M9556</guid>
      <dc:creator>echalex</dc:creator>
      <dc:date>2012-09-05T07:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder props.conf [source::] stanza</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50276#M9557</link>
      <description>&lt;P&gt;Instead of using the *.log, use the whitelist and do not escape the parenthesis.  I also found no need to escape the backslashes in the path. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::C:\Program Files (x86)\Application\Application Logs\Logs\]
sourcetype = custom_sourcetype
whitelist = \.log$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This whitelist will only match files with .log at the very end.  So its not going to grab other stuff like blah.log.bak remove the $ to get files with stuff past the .log.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2012 14:48:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forwarder-props-conf-source-stanza/m-p/50276#M9557</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2012-10-29T14:48:27Z</dc:date>
    </item>
  </channel>
</rss>

