api/agent: enable setting SuccessBeforePassing and FailuresBeforeCritical in API (#7949)
Fixes #7764 Until now these two fields could only be set through on-disk agent configuration. This change adds the fields to the agent API struct definition so that they can be set using the agent HTTP API.
This commit is contained in:
parent
3d9ca75e34
commit
c2a1322894
|
@ -216,6 +216,8 @@ type AgentServiceCheck struct {
|
|||
GRPCUseTLS bool `json:",omitempty"`
|
||||
AliasNode string `json:",omitempty"`
|
||||
AliasService string `json:",omitempty"`
|
||||
SuccessBeforePassing int `json:",omitempty"`
|
||||
FailuresBeforeCritical int `json:",omitempty"`
|
||||
|
||||
// In Consul 0.7 and later, checks that are associated with a service
|
||||
// may also contain this optional DeregisterCriticalServiceAfter field,
|
||||
|
|
|
@ -207,6 +207,14 @@ The table below shows this endpoint's support for
|
|||
|
||||
- `Status` `(string: "")` - Specifies the initial status of the health check.
|
||||
|
||||
- `SuccessBeforePassing` `(int: 0)` - Specifies the number of consecutive successful
|
||||
results required before check status transitions to passing. Available for HTTP,
|
||||
TCP, gRPC, Docker & Monitor checks.
|
||||
|
||||
- `FailuresBeforeCritical` `(int: 0)` - Specifies the number of consecutive unsuccessful
|
||||
results required before check status transitions to critical. Available for HTTP,
|
||||
TCP, gRPC, Docker & Monitor checks.
|
||||
|
||||
### Sample Payload
|
||||
|
||||
```json
|
||||
|
|
Loading…
Reference in New Issue