The env var overrides panic if we if peers was set in the config.
The type of that value is a []string and NumFields is not a valid
for that type. We don't currently support this slice fields via
the env variable settings. This particular one can be set with the
-join flag already so we just skip these fields for now.
This commit fixes the b1 cursor so that reads from either the cache
or bolt buffer will check against the previously read key to ensure
that two of the same keys are not returned.
Fixes#3571.
ValidateGroupBy was returning an error if a tag does not exist
but it appears that function was supposed to be validating that
a field name was not used as a group by field.
Fixes#3326
Any literal values in a math query e.g. the '2' in 'value * 2' are
stored as float64, so all other values must be cast to this type. This
does mean that precision may be lost if the integer values are greater
than 2^53.
This commit adds a cursor that wraps multiple `tsdb.Cursor` objects
and streams them out as one cursor. The multi-cursor automatically
dedupes keys by using the first cursor specified in the argument
list.
This allows all config variable to be set via environment variables using
a similar naming convention for the toml config. For example, to change the
HTTP API port using the config, you would set:
[http]
bind-address = ":8086"
To change it with an environment variable, you would use:
HTTP_BIND_ADDRESS=":8086" influxd
The section name is used as the env variable prefix and the config key
name is the suffix. The only change to the config name is that "-" should
be replaced with "_" to avoid shell interpretation issues.
This makes it much easier to configure docker instances within a docker container
or adhoc instances at the command-line.
For slice config sections like graphite, you can currently only override the first
entry since the default config only has 1 entry. To do that use, GRAPHITE_0 as the
prefix. You cannot currently add new entries like GRAPHITE_1. A future PR might
address this issue.
The environment variable values should be the same as the config values.
The order that configuration values are applied is as follows:
* Default config
* Config file
* Environment variables
* Command-line arguments
Fixes#3246