mirror of https://github.com/status-im/consul.git
website: document registering checks and services better. Fixes #6
This commit is contained in:
parent
5726da7b59
commit
0a19fdd10a
|
@ -60,6 +60,12 @@ readable descriptions. The field is set to any output that a script
|
|||
generates, and similarly the TTL update hooks can update the `notes`
|
||||
as well.
|
||||
|
||||
To configure a check, either provide it as a `-config-file` option to the
|
||||
agent, or place it inside the `-config-dir` of the agent. The file must
|
||||
end in the ".json" extension to be loaded by Consul. Check definitions can
|
||||
also be updated by sending a `SIGHUP` to the agent. Alternatively, the
|
||||
check can be registered dynamically using the [HTTP API](/docs/agent/http.html).
|
||||
|
||||
## Check Scripts
|
||||
|
||||
A check script is generally free to do anything to determine the status
|
||||
|
|
|
@ -132,7 +132,8 @@ Configuration files are used for more than just setting up the agent,
|
|||
they are also used to provide check and service definitions. These are used
|
||||
to announce the availability of system servers to the rest of the cluster.
|
||||
They are documented seperately under [check configuration](/docs/agent/checks.html) and
|
||||
[service configuration](/docs/agent/services.html) respectively.
|
||||
[service configuration](/docs/agent/services.html) respectively. The service and check
|
||||
definitions support being updated during a reload.
|
||||
|
||||
#### Example Configuration File
|
||||
|
||||
|
|
|
@ -52,3 +52,9 @@ check must be of the script or TTL type. If it is a script type, `script` and
|
|||
`interval` must be provided. If it is a TTL type, then only `ttl` must be
|
||||
provided. The check name is automatically generated as "service:<service-id>".
|
||||
|
||||
To configure a service, either provide it as a `-config-file` option to the
|
||||
agent, or place it inside the `-config-dir` of the agent. The file must
|
||||
end in the ".json" extension to be loaded by Consul. Check definitions can
|
||||
also be updated by sending a `SIGHUP` to the agent. Alternatively, the
|
||||
service can be registered dynamically using the [HTTP API](/docs/agent/http.html).
|
||||
|
||||
|
|
Loading…
Reference in New Issue