website: link and formatting adjustments for configtest command

This commit is contained in:
Ryan Uber 2015-05-11 09:42:06 -07:00
parent 27a4dc868c
commit b082d2f529
2 changed files with 23 additions and 21 deletions

View File

@ -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.
* <a name="config_file"></a> `-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.

View File

@ -67,6 +67,10 @@
<a href="/docs/commands/agent.html">agent</a>
</li>
<li<%= sidebar_current("docs-commands-configtest") %>>
<a href="/docs/commands/configtest.html">configtest</a>
</li>
<li<%= sidebar_current("docs-commands-event") %>>
<a href="/docs/commands/event.html">event</a>
</li>