Also added reasonable default for influxdb input plugin
to simplify configuration for most users closes #1295
This commit is contained in:
parent
9ff536d94d
commit
e809c4e445
|
@ -30,6 +30,7 @@ time before a new metric is included by the plugin.
|
||||||
- [#1142](https://github.com/influxdata/telegraf/pull/1142): Support for glob patterns in exec plugin commands configuration.
|
- [#1142](https://github.com/influxdata/telegraf/pull/1142): Support for glob patterns in exec plugin commands configuration.
|
||||||
- [#1278](https://github.com/influxdata/telegraf/pull/1278): RabbitMQ input: made url parameter optional by using DefaultURL (http://localhost:15672) if not specified
|
- [#1278](https://github.com/influxdata/telegraf/pull/1278): RabbitMQ input: made url parameter optional by using DefaultURL (http://localhost:15672) if not specified
|
||||||
- [#1197](https://github.com/influxdata/telegraf/pull/1197): Limit AWS GetMetricStatistics requests to 10 per second.
|
- [#1197](https://github.com/influxdata/telegraf/pull/1197): Limit AWS GetMetricStatistics requests to 10 per second.
|
||||||
|
- [#1278](https://github.com/influxdata/telegraf/pull/1278) & [#1288](https://github.com/influxdata/telegraf/pull/1288) & [#1295](https://github.com/influxdata/telegraf/pull/1295): RabbitMQ/Apache/InfluxDB inputs: made url(s) parameter optional by using reasonable input defaults if not specified
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
|
|
|
@ -779,6 +779,7 @@
|
||||||
# ## See the influxdb plugin's README for more details.
|
# ## See the influxdb plugin's README for more details.
|
||||||
#
|
#
|
||||||
# ## Multiple URLs from which to read InfluxDB-formatted JSON
|
# ## Multiple URLs from which to read InfluxDB-formatted JSON
|
||||||
|
# ## Default is "http://localhost:8086/debug/vars".
|
||||||
# urls = [
|
# urls = [
|
||||||
# "http://localhost:8086/debug/vars"
|
# "http://localhost:8086/debug/vars"
|
||||||
# ]
|
# ]
|
||||||
|
|
|
@ -15,6 +15,7 @@ InfluxDB-formatted endpoints. See below for more information.
|
||||||
## See the influxdb plugin's README for more details.
|
## See the influxdb plugin's README for more details.
|
||||||
|
|
||||||
## Multiple URLs from which to read InfluxDB-formatted JSON
|
## Multiple URLs from which to read InfluxDB-formatted JSON
|
||||||
|
## Default is "http://localhost:8086/debug/vars".
|
||||||
urls = [
|
urls = [
|
||||||
"http://localhost:8086/debug/vars"
|
"http://localhost:8086/debug/vars"
|
||||||
]
|
]
|
||||||
|
|
|
@ -28,6 +28,7 @@ func (*InfluxDB) SampleConfig() string {
|
||||||
## See the influxdb plugin's README for more details.
|
## See the influxdb plugin's README for more details.
|
||||||
|
|
||||||
## Multiple URLs from which to read InfluxDB-formatted JSON
|
## Multiple URLs from which to read InfluxDB-formatted JSON
|
||||||
|
## Default is "http://localhost:8086/debug/vars".
|
||||||
urls = [
|
urls = [
|
||||||
"http://localhost:8086/debug/vars"
|
"http://localhost:8086/debug/vars"
|
||||||
]
|
]
|
||||||
|
@ -35,6 +36,9 @@ func (*InfluxDB) SampleConfig() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *InfluxDB) Gather(acc telegraf.Accumulator) error {
|
func (i *InfluxDB) Gather(acc telegraf.Accumulator) error {
|
||||||
|
if len(i.URLs) == 0 {
|
||||||
|
i.URLs = []string{"http://localhost:8086/debug/vars"}
|
||||||
|
}
|
||||||
errorChannel := make(chan error, len(i.URLs))
|
errorChannel := make(chan error, len(i.URLs))
|
||||||
|
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
|
|
Loading…
Reference in New Issue