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.
I have added the path to the new config file in the "default" environment variables file:
/etc/default/telegraf
like this:
TELEGRAF_CONFIG_PATH="/home/ubuntu/some_repo/telegraf.conf"
... as well as other required variables such as passwords.
However, when I attempt to run
telegraf --test
It says No config file specified, and could not find one in $TELEGRAF_CONFIG_PATH
etc.
Further, if I force it by
telegraf --test --config /home/ubuntu/some_repo/telegraf.conf
Then the process fails because it is missing the other required variables.
Questions:
- What am I doing wrong?
- Is there not also a way of specifying a config directory too (I would like to break my file down into separate input files)?
- Perhaps as an alternative to all of this... is there not a way of specifying additional configuration files to be included from within the default
/etc/telegraf/telegraf.conf
file? (I've been unable to find any mention of this in documentation).