Feature Request
Allow for fetching a configuration file from a URL set by an environmental variable.
Proposal:
Add a new variable, such as TELEGRAF_CONFIG_URL, that will parse a configuration file from a URL.
New order for finding config file:
- -config
- $TELEGRAF_CONFIG_URL
- $TELEGRAF_CONFIG_PATH
- $HOME/.telegraf/telegraf.conf
- /etc/telegraf/telegraf.conf
Current behavior:
The -config option allows for either a URL or a file path and the TELEGRAF_CONFIG_PATH only allows a file path.
Desired behavior:
Fetch a configuration from a URL when set by TELEGRAF_CONFIG_URL.
Use case:
When setting up an InfluxDB and Telegraf stack using docker-compose the -config switch cannot be used. Therefore, an environmental variable that can resolve the URL is required.
Example:
telegraf:
image: telegraf:1.17.2
environment:
- TELEGRAF_CONFIG_URL="http://influxdb.local:8096/api/v2/telegraf/0000000000000000"
- INFLUX_TOKEN=/run/secrets/INFLUX_TOKEN
Feature Request
Allow for fetching a configuration file from a URL set by an environmental variable.
Proposal:
Add a new variable, such as
TELEGRAF_CONFIG_URL, that will parse a configuration file from a URL.New order for finding config file:
Current behavior:
The
-configoption allows for either a URL or a file path and theTELEGRAF_CONFIG_PATHonly allows a file path.Desired behavior:
Fetch a configuration from a URL when set by
TELEGRAF_CONFIG_URL.Use case:
When setting up an InfluxDB and Telegraf stack using docker-compose the
-configswitch cannot be used. Therefore, an environmental variable that can resolve the URL is required.Example:
telegraf: image: telegraf:1.17.2 environment: - TELEGRAF_CONFIG_URL="http://influxdb.local:8096/api/v2/telegraf/0000000000000000" - INFLUX_TOKEN=/run/secrets/INFLUX_TOKEN