Not sure whether you want to send to two influxdb processes (possible on separate servers) or if you want to insert twice in the same influxdb but on different databases.
Just some pointers in the documentation:
- If I read Telegraf Configuration Plugins section correctly, you can have multiple [[outputs.influxdb]] sections configured separately. So you can send data twice and possibly in different databases
- Combined with some filtering you might reach what you want to do?
If what you want is to route metrics into database1 or database2 depending on a criteria of your choice (and that you control the input payload), you can add a tag that references the database name where the metric must end up, then tell telegraf that it must interpret it.
## The value of this tag will be used to determine the database. If this
## tag is not set the 'database' option is used as the default.
# database_tag = ""