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**:
|
**Example**:
|
||||||
|
|
||||||
`/etc/default/telegraf`:
|
`/etc/default/telegraf`:
|
||||||
|
|
||||||
For InfluxDB 1.x:
|
For InfluxDB 1.x:
|
||||||
```
|
```
|
||||||
USER="alice"
|
USER="alice"
|
||||||
|
|
@ -53,18 +54,22 @@ INFLUX_SKIP_DATABASE_CREATION="true"
|
||||||
INFLUX_PASSWORD="monkey123"
|
INFLUX_PASSWORD="monkey123"
|
||||||
```
|
```
|
||||||
For InfluxDB OSS 2:
|
For InfluxDB OSS 2:
|
||||||
|
```
|
||||||
INFLUX_HOST="http://localhost:9999"
|
INFLUX_HOST="http://localhost:9999"
|
||||||
INFLUX_TOKEN=”replace_with_your_token”
|
INFLUX_TOKEN="replace_with_your_token"
|
||||||
INFLUX_ORG="your_username"
|
INFLUX_ORG="your_username"
|
||||||
INFLUX_BUCKET="replace_with_your_bucket_name"
|
INFLUX_BUCKET="replace_with_your_bucket_name"
|
||||||
|
```
|
||||||
|
|
||||||
For InfluxDB Cloud 2:
|
For InfluxDB Cloud 2:
|
||||||
# For AWS Oregon:
|
```
|
||||||
|
# For AWS West (Oregon)
|
||||||
INFLUX_HOST="https://us-west-2-1.aws.cloud2.influxdata.com"
|
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
|
# Other Cloud URLs at https://v2.docs.influxdata.com/v2.0/reference/urls/#influxdb-cloud-urls
|
||||||
INFLUX_TOKEN=”replace_with_your_token”
|
INFLUX_TOKEN=”replace_with_your_token”
|
||||||
INFLUX_ORG="yourname@yourcompany.com"
|
INFLUX_ORG="yourname@yourcompany.com"
|
||||||
INFLUX_BUCKET="replace_with_your_bucket_name"
|
INFLUX_BUCKET="replace_with_your_bucket_name"
|
||||||
|
```
|
||||||
|
|
||||||
`/etc/telegraf.conf`:
|
`/etc/telegraf.conf`:
|
||||||
```toml
|
```toml
|
||||||
|
|
@ -73,10 +78,25 @@ INFLUX_BUCKET="replace_with_your_bucket_name"
|
||||||
|
|
||||||
[[inputs.mem]]
|
[[inputs.mem]]
|
||||||
|
|
||||||
|
# For InfluxDB 1.x:
|
||||||
[[outputs.influxdb]]
|
[[outputs.influxdb]]
|
||||||
urls = ["${INFLUX_URL}"]
|
urls = ["${INFLUX_URL}"]
|
||||||
skip_database_creation = ${INFLUX_SKIP_DATABASE_CREATION}
|
skip_database_creation = ${INFLUX_SKIP_DATABASE_CREATION}
|
||||||
password = "${INFLUX_PASSWORD}"
|
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
|
The above files will produce the following effective configuration file to be
|
||||||
|
|
@ -85,6 +105,8 @@ parsed:
|
||||||
[global_tags]
|
[global_tags]
|
||||||
user = "alice"
|
user = "alice"
|
||||||
|
|
||||||
|
[[inputs.mem]]
|
||||||
|
|
||||||
# For InfluxDB 1.x:
|
# For InfluxDB 1.x:
|
||||||
[[outputs.influxdb]]
|
[[outputs.influxdb]]
|
||||||
urls = "http://localhost:8086"
|
urls = "http://localhost:8086"
|
||||||
|
|
@ -93,19 +115,19 @@ parsed:
|
||||||
|
|
||||||
# For InfluxDB OSS 2:
|
# For InfluxDB OSS 2:
|
||||||
[[outputs.influxdb_v2]]
|
[[outputs.influxdb_v2]]
|
||||||
urls = ["http://127.0.0.1:9999"]
|
urls = ["http://127.0.0.1:9999"]
|
||||||
token = "replace_with_your_token"
|
token = "replace_with_your_token"
|
||||||
org = "your_username"
|
org = "your_username"
|
||||||
bucket = "replace_with_your_bucket_name"
|
bucket = "replace_with_your_bucket_name"
|
||||||
|
|
||||||
# For InfluxDB Cloud 2:
|
# For InfluxDB Cloud 2:
|
||||||
[[outputs.influxdb_v2]]
|
[[outputs.influxdb_v2]]
|
||||||
# For AWS Oregon:
|
# For AWS West (Oregon)
|
||||||
urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
|
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
|
# Other Cloud URLs at https://v2.docs.influxdata.com/v2.0/reference/urls/#influxdb-cloud-urls
|
||||||
token = "replace_with_your_token"
|
token = "replace_with_your_token"
|
||||||
org = "yourname@yourcompany.com"
|
org = "yourname@yourcompany.com"
|
||||||
bucket = "replace_with_your_bucket_name"
|
bucket = "replace_with_your_bucket_name"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Intervals
|
### Intervals
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue