From 08909661c28874b9d8e1ba2df3e01f4219eb5c0f Mon Sep 17 00:00:00 2001 From: Blake Covarrubias Date: Thu, 23 Jan 2020 16:29:54 -0800 Subject: [PATCH] docs: Fix success/passing health check definition This commit changes the health check example shown for the success/failures_before_passing option to correctly show that the value of `checks` is an array of objects, not an object. Added text clarifying these check parameters are available in Consul 1.7.0 and later. Expanded the health check to provide a more complete configuration example. Resolves #7114. --- website/source/docs/agent/checks.html.md | 27 +++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/website/source/docs/agent/checks.html.md b/website/source/docs/agent/checks.html.md index 68295cbc5a..581e571090 100644 --- a/website/source/docs/agent/checks.html.md +++ b/website/source/docs/agent/checks.html.md @@ -370,18 +370,25 @@ key in your configuration file. ## Success/Failures before passing/critical -A check may be set to become passing/critical only if a specified number of consecutive -checks return passing/critical. Status will stay identical as before until -the threshold is reached. +In Consul 1.7.0 and later, a check may be configured to become passing/critical +only after a specified number of consecutive checks return passing/critical. +The status will not transition states until the configured threshold is reached. + This feature is available for HTTP, TCP, gRPC, Docker & Monitor checks. -By default, both passing and critical thresholds will be set to 0 so the check status will always reflect the last check result. +By default, both passing and critical thresholds will be set to 0 so the check +status will always reflect the last check result. -```javascript +```json { - "checks": { - ... - "success_before_passing" : 3 - "failures_before_critical" : 3 - }, + "checks": [ + { + "name": "HTTP TCP on port 80", + "tcp": "localhost:80", + "interval": "10s", + "timeout": "1s", + "success_before_passing": 3, + "failures_before_critical": 3 + } + ] } ```