<?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 to use env variables usage in inputs.conf? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-env-variables-usage-in-inputs-conf/m-p/416982#M73625</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I would like to use the Unix/Windows env variables in my inputs.conf, e.g. like below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...
### App server
# 1) dev_*
[monitor:///usr/sap/$SAPSYSTEMNAME/$INSTANCE/work/dev_*]
index=mlbso
disabled=false
interval=15
sourcetype=$SAPSYSTEMNAME_abaptraces
blacklist = dev_icf
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, for the above I think that the monitor path definition with the $SAPSYSTEMNAME and $INSTANCE should be fine, but I also want to put it into a system-dependent sourcetype, here ($SAPSYSTEMNAME)_abaptraces and because of the concatenation I guess it will not be properly recognized.&lt;BR /&gt;
How would I do this correct to get it into my ABC_abaptraces sourcetype?&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:10:19 GMT</pubDate>
    <dc:creator>damucka</dc:creator>
    <dc:date>2020-09-30T00:10:19Z</dc:date>
    <item>
      <title>How to use env variables usage in inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-env-variables-usage-in-inputs-conf/m-p/416982#M73625</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I would like to use the Unix/Windows env variables in my inputs.conf, e.g. like below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...
### App server
# 1) dev_*
[monitor:///usr/sap/$SAPSYSTEMNAME/$INSTANCE/work/dev_*]
index=mlbso
disabled=false
interval=15
sourcetype=$SAPSYSTEMNAME_abaptraces
blacklist = dev_icf
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, for the above I think that the monitor path definition with the $SAPSYSTEMNAME and $INSTANCE should be fine, but I also want to put it into a system-dependent sourcetype, here ($SAPSYSTEMNAME)_abaptraces and because of the concatenation I guess it will not be properly recognized.&lt;BR /&gt;
How would I do this correct to get it into my ABC_abaptraces sourcetype?&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:10:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-env-variables-usage-in-inputs-conf/m-p/416982#M73625</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2020-09-30T00:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use env variables usage in inputs.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-env-variables-usage-in-inputs-conf/m-p/416983#M73626</link>
      <description>&lt;P&gt;I don't think there's a way to do what you're trying to do in splunk .conf files. I would question your use case though: a sourcetype usually shouldn't contain a variable. Most knowledge objects are tied to sourcetype, so it should be a fixed value. Why do you need a sourcetype per host, what is the goal here? You already have the field host to distinguish your hosts. The idea behind a sourcetype is that is independent of host and source.&lt;/P&gt;

&lt;P&gt;On a side note, if you haven't encountered it yet, you might want to check out &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Admin/Splunk-launchconf"&gt;splunk-launch.conf&lt;/A&gt; for setting custom variables, though that's not going to help you in this case.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 12:58:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-env-variables-usage-in-inputs-conf/m-p/416983#M73626</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2019-04-16T12:58:42Z</dc:date>
    </item>
  </channel>
</rss>

