influxdata / influxdata/influxdb
Telegraf Config: Install instructions should let the user know what ENV variables they need to configure
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
Telegraf has the ability to use environment variables in the config: https://github.com/influxdata/telegraf/blob/master/docs/CONFIGURATION.md#environment-variables
In the UI, we display install instructions for a telegraf config:

It would be really nice if we could fetch the environment variables for a config and display them in the UI so that the user knows they need to set them before running telegraf.
a concrete example would be if I have an output like so:
```
[[outputs.influxdb_v2]]
alias = "influxdb_v2"
urls = [${INFLUX_HOSTS}]
token = "${INFLUX_TOKEN}"
organization = "${INFLUX_ORG}"
bucket = "${INFLUX_BUCKET}"
```
And when we show "install instructions" for that config, we would tell the user to set the token as normal, but also they will need to set the following ENV variables `INFLUX_HOSTS`, `INFLUX_ORG`, and `INFLUX_BUCKET`.
Contributor guide
Research direction
Start with Telegraf's docs/CONFIGURATION.md environment-variables section and the UI's install-instructions view. Trace how a config is supplied to that view, then determine how variables such as INFLUX_HOSTS, INFLUX_ORG, and INFLUX_BUCKET should be identified and displayed alongside the existing token instruction. Done means users are told which environment variables to set before running Telegraf.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100