Telegraf - can it pass iot data through to Influx?

I’m using InfluxDB to collect data from a number of remote sensors. It sits behind an IIS server, whereby posts to https://myserver/write are sent to localhost:8086, ie InfluxDB. This all works fine.

On the server I’m running Telegraf to keep an eye on the memory & disk usage of the server, and with the InfluxDB plugin I also track the number of series and measurements in InfluxDB.

From the system diagram on the web though (eg here it looks like I should be sending my raw sensor data to telegraf as well, and have that pass it on to influx.

Is that correct please, and if so can anyone point me towards some information on how to set this up? Thanks.

There are a couple advantages to this setup, it allows one or more Telegraf’s can accept the initial requests, and transfer it to InfluxDB as part of a batch write. This batching can be useful in reducing load on your InfluxDB instances and the buffering and retry logic can be helpful to avoid data loss during short downtimes.

To set this up you just need to enable the http_listener input plugin in Telegraf, this plugin runs a HTTP service that behaves the same as InfluxDB.

Great, thanks. Currently we’re sending data to many different InfluxDB databases, and in the query parameter of the post we pass the precision, target database and database credentials. If I set it up to use Telegraf in this proxy/router configuration then I understand only the precision query parameter is supported and the others are ignored.
I gather the target database is then set in [outputs.influxdb], but then that means I am limited to having 1 database? Is it possible to have Telegraf in this role and still send data to multiple databases please?
I’m not sure if I’m misunderstanding something or if I’m trying to do something that it isn’t intended for. Thank you.

I hadn’t seen this section of configuration examples, which lets me support multiple databases. I guess this is the correct way to do that?

Yes, just have one output plugin instance per database.