<?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 Utilize environmental variable in props.conf? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-utilize-environmental-variable-in-props-conf/m-p/592729#M103748</link>
    <description>&lt;P&gt;There are only a few instances where environment variables are honored and props.conf is not among them.&lt;/P&gt;&lt;P&gt;Go to&amp;nbsp;&lt;A href="https://ideas.splunk.com" target="_blank"&gt;https://ideas.splunk.com&lt;/A&gt;&amp;nbsp;to request it.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Apr 2022 16:43:29 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-04-06T16:43:29Z</dc:date>
    <item>
      <title>How to utilize environmental variable in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-utilize-environmental-variable-in-props-conf/m-p/592683#M103740</link>
      <description>&lt;P&gt;This has been asked before, and the questions seems to die. So here I am with a slightly different use case/phrasing.&lt;/P&gt;
&lt;P&gt;Dearest Splunk Devs, please let me use environmental variables in my configs.&lt;/P&gt;
&lt;P&gt;Issue:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;I have several heavy forwarders collecting logs from different endpoints.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;My users need to know which heavy forwarder the logs passed through.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;I want to add the Heavy Forwarder's hostname to the log as "collector"&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Current situaiton:&lt;/P&gt;
&lt;P&gt;transforms.conf&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[addmeta]
REGEX = .
FORMAT = collector::$HOSTNAME
WRITE_META = true&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;props.conf&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[generic_single_line]
TRANSFORMS-addmeta = addmeta&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This results in the unfortunate log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;4/6/22
1:01:17.000 PM	
testing my props.conf with a simple log
collector = $HOSTNAME
sourcetype = generic_single_line&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But what SHOULD be happening:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;4/6/22
1:01:17.000 PM	
testing my props.conf with a simple log
collector = EventCollect01.domain.com
sourcetype = generic_single_line&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What can I do to pull some sort of internal variable instead of hardcoding the host?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 14:27:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-utilize-environmental-variable-in-props-conf/m-p/592683#M103740</guid>
      <dc:creator>oliverja</dc:creator>
      <dc:date>2022-09-02T14:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to Utilize environmental variable in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-utilize-environmental-variable-in-props-conf/m-p/592729#M103748</link>
      <description>&lt;P&gt;There are only a few instances where environment variables are honored and props.conf is not among them.&lt;/P&gt;&lt;P&gt;Go to&amp;nbsp;&lt;A href="https://ideas.splunk.com" target="_blank"&gt;https://ideas.splunk.com&lt;/A&gt;&amp;nbsp;to request it.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 16:43:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-utilize-environmental-variable-in-props-conf/m-p/592729#M103748</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-04-06T16:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to Utilize environmental variable in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-utilize-environmental-variable-in-props-conf/m-p/611749#M105915</link>
      <description>&lt;P&gt;I have this exact issue too, we have hundreds of UFs managed with CICD and want a way to stamp where logs are ingested from... how do we do this?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 11:14:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-utilize-environmental-variable-in-props-conf/m-p/611749#M105915</guid>
      <dc:creator>OzUK</dc:creator>
      <dc:date>2022-09-02T11:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to Utilize environmental variable in props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-utilize-environmental-variable-in-props-conf/m-p/612032#M105939</link>
      <description>&lt;P&gt;FYI -- here is my suggestion I posted.&lt;/P&gt;&lt;P&gt;&lt;A href="https://ideas.splunk.com/ideas/DSPID-I-167" target="_blank"&gt;https://ideas.splunk.com/ideas/DSPID-I-167&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 06:23:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-utilize-environmental-variable-in-props-conf/m-p/612032#M105939</guid>
      <dc:creator>oliverja</dc:creator>
      <dc:date>2022-09-06T06:23:48Z</dc:date>
    </item>
  </channel>
</rss>

