mirror of
https://github.com/status-im/consul.git
synced 2025-01-22 19:50:36 +00:00
website: link and formatting adjustments for configtest command
This commit is contained in:
parent
3ad94bd81d
commit
8f79a964cd
@ -2,35 +2,33 @@
|
|||||||
layout: "docs"
|
layout: "docs"
|
||||||
page_title: "Commands: ConfigTest"
|
page_title: "Commands: ConfigTest"
|
||||||
sidebar_current: "docs-commands-configtest"
|
sidebar_current: "docs-commands-configtest"
|
||||||
description: |-
|
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.
|
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
|
# 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
|
||||||
|
|
||||||
Usage: `consul configtest [options]`
|
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-file` - Path to a 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.
|
|
||||||
|
|
||||||
* <a name="config_file"></a> `-config-file` - A configuration file
|
* `-config-dir` - Path to a directory of config files. All files ending in
|
||||||
to load. For more information on
|
`.json` in the directory will be included. May be specified multiple times.
|
||||||
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.
|
|
||||||
|
@ -67,6 +67,10 @@
|
|||||||
<a href="/docs/commands/agent.html">agent</a>
|
<a href="/docs/commands/agent.html">agent</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-commands-configtest") %>>
|
||||||
|
<a href="/docs/commands/configtest.html">configtest</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-commands-event") %>>
|
<li<%= sidebar_current("docs-commands-event") %>>
|
||||||
<a href="/docs/commands/event.html">event</a>
|
<a href="/docs/commands/event.html">event</a>
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user