Updates documentation to s/script/args/ in API docs.

This commit is contained in:
James Phillips 2017-10-10 16:37:08 -07:00
parent f71eabdd0f
commit d3cebace7c
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
2 changed files with 8 additions and 5 deletions

View File

@ -103,9 +103,12 @@ The table below shows this endpoint's support for
the deregistration. This should generally be configured with a timeout that's
much, much longer than any expected recoverable outage for the given service.
- `Script` `(string: "")` - Specifies a script or path to a script to run on
`Interval` to update the status of the check. If specifying a path, this path
must exist on disk and be readable by the Consul agent.
- `Args` `(array<string>)` - Specifies command arguments to run to update the
status of the check. Prior to Consul 1.0, checks used a single `Script` field
to define the command to run, and would always run in a shell. In Consul
1.0, the `Args` array was added so that checks can be run without a shell. The
`Args` field is deprecated, and you should include the shell in the `Args` to
run under a shell, eg. `"args": ["sh", "-c", "..."]`.
- `DockerContainerID` `(string: "")` - Specifies that the check is a Docker
check, and Consul will evaluate the script every `Interval` in the given
@ -153,7 +156,7 @@ The table below shows this endpoint's support for
"Name": "Memory utilization",
"Notes": "Ensure we don't oversubscribe memory",
"DeregisterCriticalServiceAfter": "90m",
"Script": "/usr/local/bin/check_mem.py",
"Args": ["/usr/local/bin/check_mem.py"],
"DockerContainerID": "f972c95ebf0e",
"Shell": "/bin/bash",
"HTTP": "https://example.com",

View File

@ -148,7 +148,7 @@ The table below shows this endpoint's support for
"EnableTagOverride": false,
"Check": {
"DeregisterCriticalServiceAfter": "90m",
"Script": "/usr/local/bin/check_redis.py",
"Args": ["/usr/local/bin/check_redis.py"],
"HTTP": "http://localhost:5000/health",
"Interval": "10s",
"TTL": "15s"