<?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 doesn't work with env variable in inputs.conf in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13598#M6717</link>
    <description>&lt;P&gt;No. In fact, Splunk itself uses the &lt;CODE&gt;$SPLUNK_HOME&lt;/CODE&gt; environment variable, and I have used Windows (and Unix) environment variables at other times in the monitor stanza headers. First, make sure that that variable is actually set. Also, I don't know if you need to specify it as &lt;CODE&gt;$ProgramFiles&lt;/CODE&gt;, rather than &lt;CODE&gt;$PROGRAMFILES&lt;/CODE&gt;. Finally, maybe there's a problem when you try to use environment variables with a wildcard (this seems likely) in which case you should probably specify the parent directory and the whitelist explicitly.&lt;/P&gt;</description>
    <pubDate>Sun, 16 May 2010 13:51:24 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2010-05-16T13:51:24Z</dc:date>
    <item>
      <title>Monitor doesn't work with env variable in inputs.conf</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13597#M6716</link>
      <description>&lt;P&gt;I observed that none of the log files are not indexed into Splunk when I used the environment variable, in my case it's the Windows OS "$PROGRAMFILES" env variable. An example is as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://$PROGRAMFILES\logs\st*Server.log]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and there are two files in logs folder "startServer.log" and "stopServer.log".&lt;/P&gt;

&lt;P&gt;However I noticed a different behavior when I used &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://C:\Program Files\logs\st*Server.log]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Both "startServer.log" and "stopServer.log" are indexed into Splunk. &lt;/P&gt;

&lt;P&gt;Is this a known limitation to only use the absolute path in the inputs.conf to monitor log files?&lt;/P&gt;</description>
      <pubDate>Sun, 16 May 2010 12:09:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13597#M6716</guid>
      <dc:creator>Nicholas_Key</dc:creator>
      <dc:date>2010-05-16T12:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor doesn't work with env variable in inputs.conf</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13598#M6717</link>
      <description>&lt;P&gt;No. In fact, Splunk itself uses the &lt;CODE&gt;$SPLUNK_HOME&lt;/CODE&gt; environment variable, and I have used Windows (and Unix) environment variables at other times in the monitor stanza headers. First, make sure that that variable is actually set. Also, I don't know if you need to specify it as &lt;CODE&gt;$ProgramFiles&lt;/CODE&gt;, rather than &lt;CODE&gt;$PROGRAMFILES&lt;/CODE&gt;. Finally, maybe there's a problem when you try to use environment variables with a wildcard (this seems likely) in which case you should probably specify the parent directory and the whitelist explicitly.&lt;/P&gt;</description>
      <pubDate>Sun, 16 May 2010 13:51:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13598#M6717</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-05-16T13:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor doesn't work with env variable in inputs.conf</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13599#M6718</link>
      <description>&lt;P&gt;i'll try adding "whitelist" in the monitor stanza and see how things go&lt;/P&gt;</description>
      <pubDate>Sun, 16 May 2010 22:09:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13599#M6718</guid>
      <dc:creator>Nicholas_Key</dc:creator>
      <dc:date>2010-05-16T22:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor doesn't work with env variable in inputs.conf</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13600#M6719</link>
      <description>&lt;P&gt;For whatever it's worth, I have inputs stanzas that uses an environment variables, an alternate groups, and wildcards without any issues. Here are two examples that are working fine on a 4.0.11 install: &lt;CODE&gt;[monitor://$SPNK_WMHOME\MWS\server\default\logs\20*_*\(_full_|install).log]&lt;/CODE&gt; and &lt;CODE&gt;[monitor://$SPNK_WMHOME\IntegrationServer\logs\(server|stats|error|security)*.log*]&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2010 21:58:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13600#M6719</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-05-17T21:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor doesn't work with env variable in inputs.conf</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13601#M6720</link>
      <description>&lt;P&gt;Just again, FYI.  When I upgraded these forwarders to 4.1.3, I had problems with BOTH of my previously provided examples.  I'm now using the &lt;CODE&gt;whitelist&lt;/CODE&gt; approach instead.  (So it appears that there is some difference between how this worked in 4.0 and 4.1)&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2010 04:02:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13601#M6720</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-06-30T04:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor doesn't work with env variable in inputs.conf</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13602#M6721</link>
      <description>&lt;P&gt;There is an example of this being used in the windows app.  Looking at Win 2k8 environment variables I see a system variable of "windir".  This leads me to believe it must be a system variable (or perhaps a user variable matching the user running the splunkd service), and is case insensitive.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://$WINDIR\WindowsUpdate.log]
sourcetype = WindowsUpdateLog
disabled = 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Apr 2011 01:57:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-doesn-t-work-with-env-variable-in-inputs-conf/m-p/13602#M6721</guid>
      <dc:creator>hazekamp</dc:creator>
      <dc:date>2011-04-12T01:57:40Z</dc:date>
    </item>
  </channel>
</rss>

