From d3cebace7c2f4fc61beb207a037cbb44daefd9a8 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Tue, 10 Oct 2017 16:37:08 -0700 Subject: [PATCH] Updates documentation to s/script/args/ in API docs. --- website/source/api/agent/check.html.md | 11 +++++++---- website/source/api/agent/service.html.md | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/website/source/api/agent/check.html.md b/website/source/api/agent/check.html.md index 16f1ec9700..6d3e00fae2 100644 --- a/website/source/api/agent/check.html.md +++ b/website/source/api/agent/check.html.md @@ -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)` - 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", diff --git a/website/source/api/agent/service.html.md b/website/source/api/agent/service.html.md index 68b9cce691..62670311e2 100644 --- a/website/source/api/agent/service.html.md +++ b/website/source/api/agent/service.html.md @@ -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"