change influxdb port 9999 to 8086 (#8198)
This commit is contained in:
parent
a452feb18d
commit
392ef9b9c0
|
|
@ -55,7 +55,7 @@ INFLUX_PASSWORD="monkey123"
|
||||||
```
|
```
|
||||||
For InfluxDB OSS 2:
|
For InfluxDB OSS 2:
|
||||||
```
|
```
|
||||||
INFLUX_HOST="http://localhost:9999"
|
INFLUX_HOST="http://localhost:8086" # used to be 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"
|
||||||
|
|
@ -83,7 +83,7 @@ INFLUX_BUCKET="replace_with_your_bucket_name"
|
||||||
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:
|
# For InfluxDB OSS 2:
|
||||||
[[outputs.influxdb_v2]]
|
[[outputs.influxdb_v2]]
|
||||||
urls = ["${INFLUX_HOST}"]
|
urls = ["${INFLUX_HOST}"]
|
||||||
|
|
@ -112,10 +112,10 @@ parsed:
|
||||||
urls = "http://localhost:8086"
|
urls = "http://localhost:8086"
|
||||||
skip_database_creation = true
|
skip_database_creation = true
|
||||||
password = "monkey123"
|
password = "monkey123"
|
||||||
|
|
||||||
# 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:8086"] # double check the port. could be 9999 if using OSS Beta
|
||||||
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"
|
||||||
|
|
@ -499,8 +499,8 @@ patterns is emitted.
|
||||||
The inverse of `tagpass`. If a match is found the metric is discarded. This
|
The inverse of `tagpass`. If a match is found the metric is discarded. This
|
||||||
is tested on metrics after they have passed the `tagpass` test.
|
is tested on metrics after they have passed the `tagpass` test.
|
||||||
|
|
||||||
> NOTE: Due to the way TOML is parsed, `tagpass` and `tagdrop` parameters must be
|
> NOTE: Due to the way TOML is parsed, `tagpass` and `tagdrop` parameters must be
|
||||||
defined at the *_end_* of the plugin definition, otherwise subsequent plugin config
|
defined at the *_end_* of the plugin definition, otherwise subsequent plugin config
|
||||||
options will be interpreted as part of the tagpass/tagdrop tables.
|
options will be interpreted as part of the tagpass/tagdrop tables.
|
||||||
|
|
||||||
#### Modifiers
|
#### Modifiers
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ Telegraf minimum version: Telegraf 1.16.0
|
||||||
```toml
|
```toml
|
||||||
[[inputs.influxdb_v2_listener]]
|
[[inputs.influxdb_v2_listener]]
|
||||||
## Address and port to host InfluxDB listener on
|
## Address and port to host InfluxDB listener on
|
||||||
service_address = ":9999"
|
## (Double check the port. Could be 9999 if using OSS Beta)
|
||||||
|
service_address = ":8086"
|
||||||
|
|
||||||
## Maximum allowed HTTP request body size in bytes.
|
## Maximum allowed HTTP request body size in bytes.
|
||||||
## 0 means to use the default of 32MiB.
|
## 0 means to use the default of 32MiB.
|
||||||
|
|
|
||||||
|
|
@ -67,13 +67,14 @@ type InfluxDBV2Listener struct {
|
||||||
|
|
||||||
const sampleConfig = `
|
const sampleConfig = `
|
||||||
## Address and port to host InfluxDB listener on
|
## Address and port to host InfluxDB listener on
|
||||||
service_address = ":9999"
|
## (Double check the port. Could be 9999 if using OSS Beta)
|
||||||
|
service_address = ":8086"
|
||||||
|
|
||||||
## Maximum allowed HTTP request body size in bytes.
|
## Maximum allowed HTTP request body size in bytes.
|
||||||
## 0 means to use the default of 32MiB.
|
## 0 means to use the default of 32MiB.
|
||||||
# max_body_size = "32MiB"
|
# max_body_size = "32MiB"
|
||||||
|
|
||||||
## Optional tag to determine the bucket.
|
## Optional tag to determine the bucket.
|
||||||
## If the write has a bucket in the query string then it will be kept in this tag name.
|
## If the write has a bucket in the query string then it will be kept in this tag name.
|
||||||
## This tag can be used in downstream outputs.
|
## This tag can be used in downstream outputs.
|
||||||
## The default value of nothing means it will be off and the database will not be recorded.
|
## The default value of nothing means it will be off and the database will not be recorded.
|
||||||
|
|
@ -336,7 +337,7 @@ func getPrecisionMultiplier(precision string) time.Duration {
|
||||||
func init() {
|
func init() {
|
||||||
inputs.Add("influxdb_v2_listener", func() telegraf.Input {
|
inputs.Add("influxdb_v2_listener", func() telegraf.Input {
|
||||||
return &InfluxDBV2Listener{
|
return &InfluxDBV2Listener{
|
||||||
ServiceAddress: ":9999",
|
ServiceAddress: ":8086",
|
||||||
timeFunc: time.Now,
|
timeFunc: time.Now,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ The InfluxDB output plugin writes metrics to the [InfluxDB v2.x] HTTP service.
|
||||||
## Multiple URLs can be specified for a single cluster, only ONE of the
|
## Multiple URLs can be specified for a single cluster, only ONE of the
|
||||||
## urls will be written to each interval.
|
## urls will be written to each interval.
|
||||||
## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
|
## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
|
||||||
urls = ["http://127.0.0.1:9999"]
|
urls = ["http://127.0.0.1:8086"]
|
||||||
|
|
||||||
## Token for authentication.
|
## Token for authentication.
|
||||||
token = ""
|
token = ""
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
defaultURL = "http://localhost:9999"
|
defaultURL = "http://localhost:8086"
|
||||||
|
|
||||||
ErrMissingURL = errors.New("missing URL")
|
ErrMissingURL = errors.New("missing URL")
|
||||||
)
|
)
|
||||||
|
|
@ -28,7 +28,7 @@ var sampleConfig = `
|
||||||
## Multiple URLs can be specified for a single cluster, only ONE of the
|
## Multiple URLs can be specified for a single cluster, only ONE of the
|
||||||
## urls will be written to each interval.
|
## urls will be written to each interval.
|
||||||
## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
|
## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
|
||||||
urls = ["http://127.0.0.1:9999"]
|
urls = ["http://127.0.0.1:8086"]
|
||||||
|
|
||||||
## Token for authentication.
|
## Token for authentication.
|
||||||
token = ""
|
token = ""
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ func TestDefaultURL(t *testing.T) {
|
||||||
if len(output.URLs) < 1 {
|
if len(output.URLs) < 1 {
|
||||||
t.Fatal("Default URL failed to get set")
|
t.Fatal("Default URL failed to get set")
|
||||||
}
|
}
|
||||||
require.Equal(t, "http://localhost:9999", output.URLs[0])
|
require.Equal(t, "http://localhost:8086", output.URLs[0])
|
||||||
}
|
}
|
||||||
func TestConnect(t *testing.T) {
|
func TestConnect(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
|
|
@ -26,7 +26,7 @@ func TestConnect(t *testing.T) {
|
||||||
{
|
{
|
||||||
out: influxdb.InfluxDB{
|
out: influxdb.InfluxDB{
|
||||||
URLs: []string{"http://localhost:1234"},
|
URLs: []string{"http://localhost:1234"},
|
||||||
HTTPProxy: "http://localhost:9999",
|
HTTPProxy: "http://localhost:8086",
|
||||||
HTTPHeaders: map[string]string{
|
HTTPHeaders: map[string]string{
|
||||||
"x": "y",
|
"x": "y",
|
||||||
},
|
},
|
||||||
|
|
@ -36,7 +36,7 @@ func TestConnect(t *testing.T) {
|
||||||
err: true,
|
err: true,
|
||||||
out: influxdb.InfluxDB{
|
out: influxdb.InfluxDB{
|
||||||
URLs: []string{"!@#$qwert"},
|
URLs: []string{"!@#$qwert"},
|
||||||
HTTPProxy: "http://localhost:9999",
|
HTTPProxy: "http://localhost:8086",
|
||||||
HTTPHeaders: map[string]string{
|
HTTPHeaders: map[string]string{
|
||||||
"x": "y",
|
"x": "y",
|
||||||
},
|
},
|
||||||
|
|
@ -56,7 +56,7 @@ func TestConnect(t *testing.T) {
|
||||||
err: true,
|
err: true,
|
||||||
out: influxdb.InfluxDB{
|
out: influxdb.InfluxDB{
|
||||||
URLs: []string{"!@#$%^&*()_+"},
|
URLs: []string{"!@#$%^&*()_+"},
|
||||||
HTTPProxy: "http://localhost:9999",
|
HTTPProxy: "http://localhost:8086",
|
||||||
HTTPHeaders: map[string]string{
|
HTTPHeaders: map[string]string{
|
||||||
"x": "y",
|
"x": "y",
|
||||||
},
|
},
|
||||||
|
|
@ -66,7 +66,7 @@ func TestConnect(t *testing.T) {
|
||||||
err: true,
|
err: true,
|
||||||
out: influxdb.InfluxDB{
|
out: influxdb.InfluxDB{
|
||||||
URLs: []string{":::@#$qwert"},
|
URLs: []string{":::@#$qwert"},
|
||||||
HTTPProxy: "http://localhost:9999",
|
HTTPProxy: "http://localhost:8086",
|
||||||
HTTPHeaders: map[string]string{
|
HTTPHeaders: map[string]string{
|
||||||
"x": "y",
|
"x": "y",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue