Specified which user health checks get run as.

Fixes issue #1036
This commit is contained in:
siddharthist 2015-06-15 21:55:05 -05:00
parent faab022f89
commit b224475ca3
1 changed files with 4 additions and 3 deletions

View File

@ -40,9 +40,10 @@ vagrant@n2:~$ echo '{"service": {"name": "web", "tags": ["rails"], "port": 80,\
```
The first definition adds a host-level check named "ping". This check runs
on a 30 second interval, invoking `ping -c1 google.com`. If the command
exits with a non-zero exit code, then the node will be flagged unhealthy.
This is the contract for any `script`-based health check.
on a 30 second interval, invoking `ping -c1 google.com`. On a `script`-based
health check, the check runs as the same user that started the Consul process.
If the command exits with a non-zero exit code, then the node will be flagged
unhealthy. This is the contract for any `script`-based health check.
The second command modifies the service named `web`, adding a check that sends a
request every 10 seconds via curl to verify that the web server is accessible.