# Telegraf output to 2x Influxdb2

**URL:** <https://community.influxdata.com/t/telegraf-output-to-2x-influxdb2/30905>\
**Category:** Telegraf\
**Tags:** influxdb, telegraf\
**Created:** [July 27, 2023, 11:54am UTC](https://community.influxdata.com/t/telegraf-output-to-2x-influxdb2/30905 "2023-07-27T11:54:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan95](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@Jonathan95](https://community.influxdata.com/u/Jonathan95)\
**Post date:** [July 27, 2023, 11:54am UTC](https://community.influxdata.com/t/telegraf-output-to-2x-influxdb2/30905/1 "2023-07-27T11:54:54Z")

</div>

Hi all,

I seem to have run into a bit of an issue,  
I have 2 influxdb2.7 with each being on their own virtual server. I have had some issues on the one  
and decided to implement a telegraf instance to try monitor/catch and investigate why it runs away  
with memory seemingly out of the blue. the Journctl doesnt have anything significant to report either  
when it happens.

Back to the matter at hand. Historian A is new fresh install and is currently getting telegraf data from  
himself and Historian B. But Id read it was possible to actually write out to 2 separate Influxdb2 at the  
same time. So id like for Historian B to also get the telegraf ouput from itself and Historian A. I found an  
example of the address section looking like this  
urls = ["“[http://124.124.124.53:8086](http://124.124.124.53:8086)"” ,“[http://124.124.124.54:8086](http://124.124.124.54:8086)”]. But not anything about how to  
sort out the tokens as i dont know how to either give the same token for a “user” from one DB to another.  
or to have both tokens in the telegraf configuration section. I have tried some combination’s in the token  
section but to no avail.

Any help would be really appreciated.

---

<div class="post-metadata">

**Author:** ![Giovanni\_Luisotto](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/giovanni_luisotto/32/4017_2.png) [@Giovanni\_Luisotto](https://community.influxdata.com/u/Giovanni_Luisotto)\
**Post date:** [July 27, 2023, 12:59pm UTC](https://community.influxdata.com/t/telegraf-output-to-2x-influxdb2/30905/2 "2023-07-27T12:59:50Z")

</div>

you can but that’s not how it works…

What you used works only for clusters

```auto
 ## Multiple URLs can be specified for a single cluster, only ONE of the
 ## urls will be written to each interval.
 urls = [" __ClusterNode1__"," __ClusterNodeN__"]

```

if you want a Telegraf instance to write to multiple databases just add another instance of the output plugin

```auto
[[outputs.influxdb_v2]]
  urls = [" __YourServer1__"]
  ...

[[outputs.influxdb_v2]]
  urls = [" __YourServer2__"]
  ...

```

---

<div class="post-metadata">

**Author:** ![Jonathan95](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@Jonathan95](https://community.influxdata.com/u/Jonathan95)\
**Post date:** [July 27, 2023, 3:15pm UTC](https://community.influxdata.com/t/telegraf-output-to-2x-influxdb2/30905/3 "2023-07-27T15:15:47Z")

</div>

ohhhh okay that explains some stuff,  
It seemed really cool that it would just work if i applied the same concept to the tokens.

Thats awesome and thankyou for the quick response. will try it out tonight  
how do i mark this as a good answer and close the topic?
