docs: add detailed documentation about Health Checking specific service using the gRPC method (#6574)

This commit is contained in:
Alexandru Matei 2020-02-03 11:19:06 +02:00 committed by GitHub
parent da9086cd03
commit e6e6759b94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 2 deletions

View File

@ -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

View File

@ -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