I had a working configuration and something was changed on the influxdb server. Now it’s trying to load telegraf config from /etc/telegraf which was never configured. The token setting had gone missing. I created a new token and the config in influx is still not being loaded. The config is still showing in the influx ui. I was able to download it and copy to /etc/telegraf so telegraf would still function. I still would like to be able to manage telegraf config from influx ui.
Does influx have to have a specific token to load the telegraf config?
How can I find the url of the telegraf config stored in influx?
centos 7 influxdb 2.7.1 telegraf 1.27.1
Hi,
Take a look at this example in the docs for using a remote Telegraf config.
You would need to:
- Ensure your token is exported in your environment as
INFLUX_TOKEN
where Telegraf is run. This token allows Telegraf to download the config.
- Ensure you are passing the URL to telegraf via the environment variable
TELEGRAF_CONFIG_PATH
. Loading a config from /etc/telegraf
is the default behavior if you are running as a service. In which case, you may also need to update the service file to point at the URL.
Does influx have to have a specific token to load the telegraf config?
Influx doesn’t, but telegraf does as I mentioned above
How can I find the url of the telegraf config stored in influx?
This is in the influx UI. There is a video at the top of the page I linked with a demo of where to get that URL.
Hi,
Thank you for your response. I was able to locate the correct id for the config using the link you mentioned. I tried the url from the article and got invalid id as expected.
http://localhost:8086/api/v2/telegrafs/0xoX00oOx0xoX00o
I removed the number and tried again.
http://localhost:8086/api/v2/telegrafs
The url returned the id and name for the current telegraf config. This solved my problem.
Thank you for your help.