Fixes typos in sample config file #2647
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have been working on installing the latest version of Influx (0.9) onto a system that is not connected to the internet. This involves building it from source, on 64-bit Ubuntu 14.04, and sourcing any dependencies without resorting to
go get
.Like most users I start with the sample config file and tweak it to suit my scenario. While looking at various details I noticed that the
etc/config.sample.toml
contains fields which do not match the code. This means that if I uncomment these fields their values will not be used which is not what a normal user would expect.The code that parses the Collectd section of the configuration file tries to read a field called
bind-address
and if it can't be found then the fallbackdefaultBindAddr
is used. Similarly, the Graphite section parsing code does the same thing.In the Influx sample configuration file
etc/config.sample.toml
the address fields for both Collectd and Graphite are labelledaddress
. A normal user would expect to be able to uncomment these and have them work. However, because of the mismatch already mentioned, this would not happen.Collectd:
etc/config.sample.toml:
cmd/influxd/config.go:
Graphite:
etc/config.sample.toml:
cmd/influxd/config.go:
The config_test.go file contains the correct
bind-address
fields. So, it just looks like the content in theetc/config.sample.toml
has become inconsistent with the code.This pull request just fixes the fields in the
etc/config.sample.toml
so they are consistent with the code. It also adds a space after some of the comment characters so the file looks consistent.A better long term solution might be to generate the default configuration file from the application. This would hopefully avoid the issue of inconsistency between the sample configuration file and what the code expects.
From a consistency perspective it would be good if the
address
field under theopentsdb
section also usedbind-address
like theCollectd
andGraphite
sections. This is likely a job for a separate pull request.