mirror of https://github.com/hashicorp/consul
docs: add detailed documentation about Health Checking specific service using the gRPC method (#6574)
parent
699d1b2acb
commit
5a6e602b86
|
@ -159,7 +159,7 @@ The table below shows this endpoint's support for
|
||||||
- `GRPC` `(string: "")` - Specifies a `gRPC` check's endpoint that supports the standard
|
- `GRPC` `(string: "")` - Specifies a `gRPC` check's endpoint that supports the standard
|
||||||
[gRPC health checking protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
|
[gRPC health checking protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
|
||||||
The state of the check will be updated at the given `Interval` by probing the configured
|
The state of the check will be updated at the given `Interval` by probing the configured
|
||||||
endpoint.
|
endpoint. Add the service identifier after the `gRPC` check's endpoint in the following format to check for a specific service instead of the whole gRPC server `/:service_identifier`.
|
||||||
|
|
||||||
- `GRPCUseTLS` `(bool: false)` - Specifies whether to use TLS for this `gRPC` health check.
|
- `GRPCUseTLS` `(bool: false)` - Specifies whether to use TLS for this `gRPC` health check.
|
||||||
If TLS is enabled, then by default, a valid TLS certificate is expected. Certificate
|
If TLS is enabled, then by default, a valid TLS certificate is expected. Certificate
|
||||||
|
|
|
@ -117,6 +117,7 @@ There are several different kinds of checks:
|
||||||
setting `grpc_use_tls` in the check definition. If TLS is enabled, then by default, a valid
|
setting `grpc_use_tls` in the check definition. If TLS is enabled, then by default, a valid
|
||||||
TLS certificate is expected. Certificate verification can be turned off by setting the
|
TLS certificate is expected. Certificate verification can be turned off by setting the
|
||||||
`tls_skip_verify` field to `true` in the check definition.
|
`tls_skip_verify` field to `true` in the check definition.
|
||||||
|
To check on a specific service instead of the whole gRPC server, add the service identifier after the `gRPC` check's endpoint in the following format `/:service_identifier`.
|
||||||
|
|
||||||
* <a name="alias"></a>Alias - These checks alias the health state of another registered
|
* <a name="alias"></a>Alias - These checks alias the health state of another registered
|
||||||
node or service. The state of the check will be updated asynchronously,
|
node or service. The state of the check will be updated asynchronously,
|
||||||
|
@ -204,7 +205,7 @@ A Docker check:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
A gRPC check:
|
A gRPC check for the whole application:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
|
@ -218,6 +219,20 @@ A gRPC check:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
A gRPC check for the specific `my_service` service:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
{
|
||||||
|
"check": {
|
||||||
|
"id": "mem-util",
|
||||||
|
"name": "Service health status",
|
||||||
|
"grpc": "127.0.0.1:12345/my_service",
|
||||||
|
"grpc_use_tls": true,
|
||||||
|
"interval": "10s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
An alias check for a local service:
|
An alias check for a local service:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|
Loading…
Reference in New Issue