Get Telegraf to send to multiple InfluxDB hosts

telegraf

#1

I totally get that I can use Enterprise Influx to solve this issue and understand if that is the only way to get what I want out of the box.

I have two servers that I want to use as influxdb host and I want my servers which are running telegraf daemons to post to both servers. I know that if I setup urls = [“server1”,“server2”] in [[outputs.influxdb]] I get round robin sending not duplicate sending.

Is there anyway short of placing a multiplexer in the path of telegraf to get a single telegraf daemon to send to multiple influx servers.


#2

Yes, you can define multiple outputs:

[[outputs.influxdb]]
  urls = ["http://server1:8086"]
  # ... other options ...

[[outputs.influxdb]]
  urls = ["http://server2:8086"]
  # ... other options ...

#3

This works great - Thanks very much for the response!