Configuration for sending metrics to InfluxDB multiple buckets

For the switch to my new “big” influxdb2 I am trying to send the measurements to different Buckets.
( i used this telegraf/CONFIGURATION.md at master · influxdata/telegraf · GitHub )
This is my Telegraf configuration, all telegraf own measurements should go to the telegraf Bucket.

Other measurements should go to test bucket.
Still all my messages go to the udp.autogen bucket.
I made the bucket test in the influxdb.no luck, no error messages in telegraf.
So why the bucket UDP.autogen ??

Configuration for sending metrics to InfluxDB

[[outputs.influxdb]]
urls = [“udp://localhost:8089”]
database = “telegraf”
namedrop = [“Test*”]

All measurements should go to the bucket “test”

[[outputs.influxdb]]
urls = [“udp://localhost:8089”]
database = “test”
namepass = [“Test*”]

Switching the parameter does not change anything
exclude_database_tag = false

=======================================input=============

[[inputs.socket_listener]]
service_address = “udp://:8094”
data_format = “influx”

Startup telegraf log
2021-05-01T18:35:37Z D! [agent] Initializing plugins
2021-05-01T18:35:37Z D! [agent] Connecting outputs
2021-05-01T18:35:37Z D! [agent] Attempting connection to [outputs.influxdb]
2021-05-01T18:35:37Z D! [agent] Successfully connected to outputs.influxdb
2021-05-01T18:35:37Z D! [agent] Attempting connection to [outputs.influxdb]
2021-05-01T18:35:37Z D! [agent] Successfully connected to outputs.influxdb
2021-05-01T18:35:37Z D! [agent] Starting service inputs

So it starts2 outputs ?

I suggest you have a look at the docs on github…

I’ll report here just the first section of the influxdb2 output, which contains the main parameters.

[[outputs.influxdb_v2]]
  ## The URLs of the InfluxDB cluster nodes.
  ##
  ## Multiple URLs can be specified for a single cluster, only ONE of the
  ## urls will be written to each interval.
  ##   ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
  urls = ["http://127.0.0.1:8086"]

  ## Token for authentication.
  token = ""

  ## Organization is the name of the organization you wish to write to.
  organization = ""

  ## Destination bucket to write into.
  bucket = ""

  ## The value of this tag will be used to determine the bucket.  If this
  ## tag is not set the 'bucket' option is used as the default.
  # bucket_tag = ""

  ## If true, the bucket tag will not be added to the metric.
  # exclude_bucket_tag = false

  ## Timeout for HTTP messages.
  # timeout = "5s"

In your config I don’t even see the correct output being used, and if the v1 output works even for influxdb2 then you might have some luck with the retention_policy = '' parameter.

Since you haven’t specified any bucker or retention_policy, it will write in the default one, called “autogen”

Thx, but i’am testing on InfluxDb 1.8. the 2 version is for later.

for influxdb1 there is the retention_policy = '' parameter, otherwise the data will be written to the default RP of the database

From another forum i got information to change from UDP to TCP
The retention i did not change, but i coud change it in the web ui
All my measurements end up in the desired bucket
[[outputs.influxdb]]
urls = [“http://127.0.0.1:8086”]
database = “test”
namepass = [“Test*”]
username = “Telegraaf”
password = “MySecret”

[[outputs.influxdb]]
urls = [“http://127.0.0.1:8086”]
database = “test”
namepass = [“Test*”]
username = “Telegraaf”
password = “MySecret”