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"
|
||||||
|
|
@ -115,7 +115,7 @@ 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: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"
|
||||||
|
|
|
||||||
|
|
@ -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,7 +67,8 @@ 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.
|
||||||
|
|
@ -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