diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 341accefd4eea..9b8b07263b700 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -55,7 +55,7 @@ INFLUX_PASSWORD="monkey123" ``` 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_ORG="your_username" INFLUX_BUCKET="replace_with_your_bucket_name" @@ -83,7 +83,7 @@ INFLUX_BUCKET="replace_with_your_bucket_name" urls = ["${INFLUX_URL}"] skip_database_creation = ${INFLUX_SKIP_DATABASE_CREATION} password = "${INFLUX_PASSWORD}" - + # For InfluxDB OSS 2: [[outputs.influxdb_v2]] urls = ["${INFLUX_HOST}"] @@ -112,10 +112,10 @@ parsed: urls = "http://localhost:8086" skip_database_creation = true password = "monkey123" - + # For InfluxDB OSS 2: [[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" org = "your_username" 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 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 -defined at the *_end_* of the plugin definition, otherwise subsequent plugin config +> 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 options will be interpreted as part of the tagpass/tagdrop tables. #### Modifiers diff --git a/plugins/inputs/influxdb_v2_listener/README.md b/plugins/inputs/influxdb_v2_listener/README.md index cef11e9ae380a..9f89860f5af39 100644 --- a/plugins/inputs/influxdb_v2_listener/README.md +++ b/plugins/inputs/influxdb_v2_listener/README.md @@ -14,7 +14,8 @@ defer to the output plugins configuration. ```toml [[inputs.influxdb_v2_listener]] ## 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. ## 0 means to use the default of 32MiB. diff --git a/plugins/inputs/influxdb_v2_listener/influxdb_v2_listener.go b/plugins/inputs/influxdb_v2_listener/influxdb_v2_listener.go index 01d47b201f502..30c449f7dd910 100644 --- a/plugins/inputs/influxdb_v2_listener/influxdb_v2_listener.go +++ b/plugins/inputs/influxdb_v2_listener/influxdb_v2_listener.go @@ -67,13 +67,14 @@ type InfluxDBV2Listener struct { const sampleConfig = ` ## 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. ## 0 means to use the default of 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. ## 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. @@ -336,7 +337,7 @@ func getPrecisionMultiplier(precision string) time.Duration { func init() { inputs.Add("influxdb_v2_listener", func() telegraf.Input { return &InfluxDBV2Listener{ - ServiceAddress: ":9999", + ServiceAddress: ":8086", timeFunc: time.Now, } }) diff --git a/plugins/outputs/influxdb_v2/README.md b/plugins/outputs/influxdb_v2/README.md index 1605bda0c725a..b176fffcd31e1 100644 --- a/plugins/outputs/influxdb_v2/README.md +++ b/plugins/outputs/influxdb_v2/README.md @@ -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 ## urls will be written to each interval. ## 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 = "" diff --git a/plugins/outputs/influxdb_v2/influxdb.go b/plugins/outputs/influxdb_v2/influxdb.go index ccafbc4bd685a..6076297f8c83a 100644 --- a/plugins/outputs/influxdb_v2/influxdb.go +++ b/plugins/outputs/influxdb_v2/influxdb.go @@ -17,7 +17,7 @@ import ( ) var ( - defaultURL = "http://localhost:9999" + defaultURL = "http://localhost:8086" ErrMissingURL = errors.New("missing URL") ) @@ -28,7 +28,7 @@ var sampleConfig = ` ## Multiple URLs can be specified for a single cluster, only ONE of the ## urls will be written to each interval. ## 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 = "" diff --git a/plugins/outputs/influxdb_v2/influxdb_test.go b/plugins/outputs/influxdb_v2/influxdb_test.go index 25af4fe6a4c6e..90a3823915a5b 100644 --- a/plugins/outputs/influxdb_v2/influxdb_test.go +++ b/plugins/outputs/influxdb_v2/influxdb_test.go @@ -16,7 +16,7 @@ func TestDefaultURL(t *testing.T) { if len(output.URLs) < 1 { 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) { tests := []struct { @@ -26,7 +26,7 @@ func TestConnect(t *testing.T) { { out: influxdb.InfluxDB{ URLs: []string{"http://localhost:1234"}, - HTTPProxy: "http://localhost:9999", + HTTPProxy: "http://localhost:8086", HTTPHeaders: map[string]string{ "x": "y", }, @@ -36,7 +36,7 @@ func TestConnect(t *testing.T) { err: true, out: influxdb.InfluxDB{ URLs: []string{"!@#$qwert"}, - HTTPProxy: "http://localhost:9999", + HTTPProxy: "http://localhost:8086", HTTPHeaders: map[string]string{ "x": "y", }, @@ -56,7 +56,7 @@ func TestConnect(t *testing.T) { err: true, out: influxdb.InfluxDB{ URLs: []string{"!@#$%^&*()_+"}, - HTTPProxy: "http://localhost:9999", + HTTPProxy: "http://localhost:8086", HTTPHeaders: map[string]string{ "x": "y", }, @@ -66,7 +66,7 @@ func TestConnect(t *testing.T) { err: true, out: influxdb.InfluxDB{ URLs: []string{":::@#$qwert"}, - HTTPProxy: "http://localhost:9999", + HTTPProxy: "http://localhost:8086", HTTPHeaders: map[string]string{ "x": "y", },