Line write protocol in InfluxCloud

I can’t seem to find the exact details on how to write data into my InfluxDB Cloud instance. No doubt the bucket and organization go somewhere in addition to the token.
Thought I might figure out from Telegraf writing data. The approach to generate the config in InfluxCloud is neat, but I’m confused to find that it works with live copy of the config, but not with the downloaded config file…

Hello @rvdheij,

In the output section of the config:

[[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.
  ## urls exp: http://127.0.0.1:9999
  urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]

  ## Token for authentication.
  token = "$INFLUX_TOKEN"

  ## Organization is the name of the organization you wish to write to; must exist.
  organization = "anais@influxdata.com"

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

Is where you can specify your token bucket and organization. This is what that portion looks like from the UI. The downloaded telegraf config should work just fine. You might have to click the bright blue “set up instructions” button next to your telegraf config, and make sure to export a token correctly before using telegraf --config yourconfig.conf.
If you don’t have a token, you might have to generate a new one.

What errors are you getting?

Hi @Anaisdg
Thank you for looking into this. The weird thing is that it works when using the live version of the config, but fails when I have the config downloaded and copied over. I started to wonder whether there were things done special for when it’s a live config.


This shows one run with the --config https://eu-central… that works, and the one with sample.conf that fails. I just downloaded the config again.

Apart from this behavior, I’m still looking for the specification for the write protocol into InfluxDB Cloud (like headers and parameters on the URL etc).

Hold the press… after these error messages, telegraf does appear to be sending data. I never got these when using the live config file, but always get them when using my copy (but never waited long enough to see that it still worked).
Could it be that retrieving the config file like that is waking up my instance and primes it for writing data, while otherwise the first few attempts hit the wall?