Fix configuration.md formatting (#7965)
* fix configuration.md formatting * include cloud url comments
This commit is contained in:
parent
073a9beee3
commit
389c5380ed
|
|
@ -45,6 +45,7 @@ in the `/etc/default/telegraf` file.
|
|||
**Example**:
|
||||
|
||||
`/etc/default/telegraf`:
|
||||
|
||||
For InfluxDB 1.x:
|
||||
```
|
||||
USER="alice"
|
||||
|
|
@ -53,18 +54,22 @@ INFLUX_SKIP_DATABASE_CREATION="true"
|
|||
INFLUX_PASSWORD="monkey123"
|
||||
```
|
||||
For InfluxDB OSS 2:
|
||||
```
|
||||
INFLUX_HOST="http://localhost:9999"
|
||||
INFLUX_TOKEN=”replace_with_your_token”
|
||||
INFLUX_TOKEN="replace_with_your_token"
|
||||
INFLUX_ORG="your_username"
|
||||
INFLUX_BUCKET="replace_with_your_bucket_name"
|
||||
```
|
||||
|
||||
For InfluxDB Cloud 2:
|
||||
# For AWS Oregon:
|
||||
```
|
||||
# For AWS West (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
|
||||
|
|
@ -73,10 +78,25 @@ INFLUX_BUCKET="replace_with_your_bucket_name"
|
|||
|
||||
[[inputs.mem]]
|
||||
|
||||
# For InfluxDB 1.x:
|
||||
[[outputs.influxdb]]
|
||||
urls = ["${INFLUX_URL}"]
|
||||
skip_database_creation = ${INFLUX_SKIP_DATABASE_CREATION}
|
||||
password = "${INFLUX_PASSWORD}"
|
||||
|
||||
# For InfluxDB OSS 2:
|
||||
[[outputs.influxdb_v2]]
|
||||
urls = ["${INFLUX_HOST}"]
|
||||
token = ["${INFLUX_TOKEN}"]
|
||||
org = ["${INFLUX_ORG}"]
|
||||
bucket = ["${INFLUX_BUCKET}"]
|
||||
|
||||
# For InfluxDB Cloud 2:
|
||||
[[outputs.influxdb_v2]]
|
||||
urls = ["${INFLUX_HOST}"]
|
||||
token = ["${INFLUX_TOKEN}"]
|
||||
org = ["${INFLUX_ORG}"]
|
||||
bucket = ["${INFLUX_BUCKET}"]
|
||||
```
|
||||
|
||||
The above files will produce the following effective configuration file to be
|
||||
|
|
@ -85,6 +105,8 @@ parsed:
|
|||
[global_tags]
|
||||
user = "alice"
|
||||
|
||||
[[inputs.mem]]
|
||||
|
||||
# For InfluxDB 1.x:
|
||||
[[outputs.influxdb]]
|
||||
urls = "http://localhost:8086"
|
||||
|
|
@ -93,19 +115,19 @@ parsed:
|
|||
|
||||
# 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"
|
||||
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"
|
||||
# For AWS West (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
|
||||
token = "replace_with_your_token"
|
||||
org = "yourname@yourcompany.com"
|
||||
bucket = "replace_with_your_bucket_name"
|
||||
```
|
||||
|
||||
### Intervals
|
||||
|
|
|
|||
Loading…
Reference in New Issue