title: Why isn't telegraf reading environmental variables?
body: <p>My goal is to put my telegraf config into source control. To do so, I have a repo in my user's home directory with the appropriate config file which has already been tested and proven working.</p>
  <p>I have added the path to the new config file in the &quot;default&quot; environment variables file:</p>
  <p><code>/etc/default/telegraf</code></p>
  <p>like this:</p>
  <pre><code>TELEGRAF_CONFIG_PATH=&quot;/home/ubuntu/some_repo/telegraf.conf&quot;
  </code></pre>
  <p>... as well as other required variables such as passwords.</p>
  <p>However, when I attempt to run</p>
  <p><code>telegraf --test</code></p>
  <p>It says <code>No config file specified, and could not find one in $TELEGRAF_CONFIG_PATH</code> etc.</p>
  <p>Further, if I force it by</p>
  <p><code>telegraf --test --config /home/ubuntu/some_repo/telegraf.conf</code></p>
  <p>Then the process fails because it is missing the other required variables.</p>
  <p>Questions:</p>
  <ol>
  <li>What am I doing wrong?</li>
  <li>Is there not also a way of specifying a config directory too (I would like to break my file down into separate input files)?</li>
  <li>Perhaps as an alternative to all of this... is there not a way of specifying additional configuration files to be included from <em>within</em> the default <code>/etc/telegraf/telegraf.conf</code> file? (I've been unable to find any mention of this in documentation).</li>
  </ol>