Description
Proposal:
Clarify how to produce a default configuration file for new setup. Some possible avenues:
- Un-deprecate
influxd print-config
- Rename
print-config
subcommand to avoid confusion (assuming that was the reason for deprecation) - If a suitable alternative already exists, suggest it along with or instead of
influx server-config
- If best practice has changed entirely, at least update the documentation for the docker image (and elsewhere, if appropriate) accordingly
Current behavior:
The docker image documentation's configuration section recommends influxd print-config
to obtain the default configuration. When you actually do this, however, InfluxDB 2.4.0 warns:
Command "print-config" is deprecated, use the influx-cli command server-config to display the configuration values from the running server
Okay, very well, but if you do what that recommends (and I'm not sure if this is intentional, but influx-cli
is misleading, as the CLI is called simply influx
):
Error: failed to retrieve config: Get "http://localhost:8086/api/v2/config": dial tcp 127.0.0.1:8086: connect: connection refused
And looking at the --help
output it seems that influx server-config
can only retrieve actual config from a running server.
Desired behavior:
A quickstart config file is useful for, well, getting started quickly. The docs for the deprecated influxd print-config
option also make it sound quite useful for understanding the effect of various administrative changes (emphasis mine):
Print config (in YAML) that the influxd server would use if run with the current flags/env vars/config file.
Whereas the recommended replacement influx server-config
seems only to be able to produce the configuration that a server is actually using. The use cases don't overlap in my opinion.
Alternatives considered:
Besides the recommended replacement, I also tried to find alternatives through the online documentation but a couple of searches I tried were not fruitful.
Use case:
- Quick start with sane defaults
- Understanding the impact and inter-relationship of environment variables, flags, and file-based config options