From df93825112b62c2e9d5a2a89ca3b19f7293fe409 Mon Sep 17 00:00:00 2001 From: Al Sargent Date: Thu, 6 Aug 2020 13:43:21 -0700 Subject: [PATCH] Add details to connect to InfluxDB OSS 2 and Cloud 2 (#7953) --- docs/CONFIGURATION.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 53233c598..2bd5ca3d9 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -45,12 +45,26 @@ in the `/etc/default/telegraf` file. **Example**: `/etc/default/telegraf`: +For InfluxDB 1.x: ``` USER="alice" INFLUX_URL="http://localhost:8086" INFLUX_SKIP_DATABASE_CREATION="true" INFLUX_PASSWORD="monkey123" ``` +For InfluxDB OSS 2: +INFLUX_HOST="http://localhost:9999" +INFLUX_TOKEN=”replace_with_your_token” +INFLUX_ORG="your_username" +INFLUX_BUCKET="replace_with_your_bucket_name" + +For InfluxDB Cloud 2: +# For AWS Oregon: +INFLUX_HOST="https://us-west-2-1.aws.cloud2.influxdata.com" +# Other Cloud URLs at https://v2.docs.influxdata.com/v2.0/reference/urls/#influxdb-cloud-urls +INFLUX_TOKEN=”replace_with_your_token” +INFLUX_ORG="yourname@yourcompany.com" +INFLUX_BUCKET="replace_with_your_bucket_name" `/etc/telegraf.conf`: ```toml @@ -71,10 +85,27 @@ parsed: [global_tags] user = "alice" +# For InfluxDB 1.x: [[outputs.influxdb]] urls = "http://localhost:8086" skip_database_creation = true password = "monkey123" + +# For InfluxDB OSS 2: +[[outputs.influxdb_v2]] +urls = ["http://127.0.0.1:9999"] +token = "replace_with_your_token" +org = "your_username" +bucket = "replace_with_your_bucket_name" + +# For InfluxDB Cloud 2: +[[outputs.influxdb_v2]] +# For AWS Oregon: +urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"] +# Other Cloud URLs at https://v2.docs.influxdata.com/v2.0/reference/urls/#influxdb-cloud-urls +token = "replace_with_your_token" +org = "yourname@yourcompany.com" +bucket = "replace_with_your_bucket_name" ``` ### Intervals