diff --git a/website/source/docs/commands/configtest.html.markdown b/website/source/docs/commands/configtest.html.markdown index 927b8f25fd..43543dec45 100644 --- a/website/source/docs/commands/configtest.html.markdown +++ b/website/source/docs/commands/configtest.html.markdown @@ -2,35 +2,33 @@ layout: "docs" page_title: "Commands: ConfigTest" sidebar_current: "docs-commands-configtest" -description: |- - The `consul configtest` command tests that config files are valid by attempting to parse them. Useful to ensure a configuration change will not cause consul to fail after a restart. +description: > + The `consul configtest` command tests that config files are valid by + attempting to parse them. Useful to ensure a configuration change will + not cause consul to fail after a restart. --- # Consul ConfigTest -The `consul configtest` command tests that config files are valid by attempting to parse them. Useful to ensure a configuration change will not cause consul to fail after a restart. +The `consul configtest` command performs a basic sanity test on Consul +configuration files. For each file or directory given, the configtest command +will attempt to parse the contents just as the "consul agent" command would, +and catch any errors. This is useful to do a test of the configuration only, +without actually starting the agent. + +For more information on the format of Consul's configuration files, read the +consul agent [Configuration Files](/docs/agent/options.html#configuration_files) +section. ## Usage Usage: `consul configtest [options]` -At least one `-config-file` or `-config-dir` paramater must be given. The list of available flags are: +At least one `-config-file` or `-config-dir` paramater must be given. Returns 0 +if the configuration is valid, or 1 if there are problems. The list of +available flags are: -- `-config-file` - config file. may be specified multiple times -- `-config-dir` - config directory. all files ending in `.json` in the directory will be included. may be specified multiple times. +* `-config-file` - Path to a config file. May be specified multiple times. -* `-config-file` - A configuration file - to load. For more information on - the format of this file, read the [Configuration Files](/docs/agent/options.html#configuration_files) section in the agent option documentation. - This option can be specified multiple times to load multiple configuration - files. If it is specified multiple times, configuration files loaded later - will merge with configuration files loaded earlier. During a config merge, - single-value keys (string, int, bool) will simply have their values replaced - while list types will be appended together. - -* `-config-dir` - A directory of - configuration files to load. Consul will - load all files in this directory with the suffix ".json". The load order - is alphabetical, and the the same merge routine is used as with the - [`config-file`](#_config_file) option above. For more information - on the format of the configuration files, see the [Configuration Files](/docs/agent/options.html#configuration_files) section in the agent option documentation. +* `-config-dir` - Path to a directory of config files. All files ending in + `.json` in the directory will be included. May be specified multiple times. diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 28c1cbb132..bdd30d8fb3 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -67,6 +67,10 @@ agent +