InfluxDB 2 Telegraf URL configuration confusion

I’m currently testing version 2.0.0 (fb95362) running on an AWS EC2 instance and generating the configuration file for Telegraf via the GUI. I noticed that it uses the IP address of the GUI’s URL whenever it generates the configuration file (e.g. http://54.xxx.xxx.xxx:8086).

For example, if I access it using the public IP address of the EC2 instance, it will use that public IP address when it generates the Telegraf URL configuration.

urls = ["http://54.xxx.xxx.xxx:8086"]

I like the idea of just pointing the Telegraf agent to a remote configuration file instead of generating the configuration file on the remote machines but is it possible to tell InfluxDB that I want to use a base IP address for the URLs instead of it using the IP from the URL used to access the GUI?

You can change the IP, provided you’ve got access to your InfluxDB publically.

However, we’d expect most of your Telegraf instances to live within your infrastructure and access over local ip.

I think it would be worth opening a feature request on the influxdb repository for this, I can imagine many reasons this would need to be different such as when the write path is through a proxy.

Yea. 100% needs to be configurable. Why would I use a local IP when DNS exists? That way if a system fails or something needs to move, I don’t have to update the configuration on hundreds or thousands of telegraf (or other) collectors.

Also for HA, I may have a proxy in use. Something to provide TLS termination because everything should behind TLS - even locally.

I could keep going, but instead I filed the FR: https://github.com/influxdata/influxdb/issues/14122

1 Like