mirror of https://github.com/hashicorp/consul
Updates documentation to s/script/args/ in API docs.
parent
f71eabdd0f
commit
d3cebace7c
|
@ -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
|
the deregistration. This should generally be configured with a timeout that's
|
||||||
much, much longer than any expected recoverable outage for the given service.
|
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
|
- `Args` `(array<string>)` - Specifies command arguments to run to update the
|
||||||
`Interval` to update the status of the check. If specifying a path, this path
|
status of the check. Prior to Consul 1.0, checks used a single `Script` field
|
||||||
must exist on disk and be readable by the Consul agent.
|
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
|
- `DockerContainerID` `(string: "")` - Specifies that the check is a Docker
|
||||||
check, and Consul will evaluate the script every `Interval` in the given
|
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",
|
"Name": "Memory utilization",
|
||||||
"Notes": "Ensure we don't oversubscribe memory",
|
"Notes": "Ensure we don't oversubscribe memory",
|
||||||
"DeregisterCriticalServiceAfter": "90m",
|
"DeregisterCriticalServiceAfter": "90m",
|
||||||
"Script": "/usr/local/bin/check_mem.py",
|
"Args": ["/usr/local/bin/check_mem.py"],
|
||||||
"DockerContainerID": "f972c95ebf0e",
|
"DockerContainerID": "f972c95ebf0e",
|
||||||
"Shell": "/bin/bash",
|
"Shell": "/bin/bash",
|
||||||
"HTTP": "https://example.com",
|
"HTTP": "https://example.com",
|
||||||
|
|
|
@ -148,7 +148,7 @@ The table below shows this endpoint's support for
|
||||||
"EnableTagOverride": false,
|
"EnableTagOverride": false,
|
||||||
"Check": {
|
"Check": {
|
||||||
"DeregisterCriticalServiceAfter": "90m",
|
"DeregisterCriticalServiceAfter": "90m",
|
||||||
"Script": "/usr/local/bin/check_redis.py",
|
"Args": ["/usr/local/bin/check_redis.py"],
|
||||||
"HTTP": "http://localhost:5000/health",
|
"HTTP": "http://localhost:5000/health",
|
||||||
"Interval": "10s",
|
"Interval": "10s",
|
||||||
"TTL": "15s"
|
"TTL": "15s"
|
||||||
|
|
Loading…
Reference in New Issue