Add details to connect to InfluxDB OSS 2 and Cloud 2 (#7953)

This commit is contained in:
Al Sargent 2020-08-06 13:43:21 -07:00 committed by GitHub
parent 2e751d0b54
commit df93825112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 31 additions and 0 deletions

View File

@ -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