2.13gRPC
What it checks#
A gRPC monitor asks a gRPC server whether it is healthy. It calls the standard health service, grpc.health.v1.Health/Check, on a host and port. The check is up only when the server answers SERVING.
A TCP monitor reads a server that is shutting down as healthy, because it still accepts connections. A gRPC monitor asks the server itself.
When it is up, degraded or down#
- Up: the server answered
SERVINGwithin the timeout, and the response-time assertion passed, if you set one. - Degraded: the answer was slower than your slow limit, if you set one.
- Down: any other answer, such as
health status is NOT_SERVING. Also down:- the server has no health service:
the server does not implement the gRPC health service (grpc.health.v1.Health). - the health service does not know the service you named:
the server's health service does not know the service "acme.orders.v1.Orders". - no answer in time:
no health answer within 10s. - the connection or TLS failed, or an assertion failed, for example
assertion response_time_ms < 200: got 340.
- the server has no health service:
Configuration#
| Dashboard field | Default | Limits and notes |
|---|---|---|
| name | Empty | Required. Up to 200 characters, on one line. |
| check interval | 60 seconds | At least 1 second. Your plan's minimum interval still applies: below it the form shows Your plan checks at most every N seconds. |
| timeout | 10 seconds | In seconds. A value above 60 seconds counts as 60 seconds. |
| locations | None (runs from us-west) | Choose from the regions shown. The check runs from each one you pick. |
| on failure — notify | None (all team channels) | Pick channels to limit who is alerted. Shown only when your team has channels. |
| endpoint (host) | Empty | Required. Host only, such as api.acme.io. A scheme, port or path gives Host only — no scheme, port or path. |
| endpoint (port) | Empty | Required. 1 to 65535. |
| plaintext | Off | Off: the connection uses TLS and the server's certificate is checked. On: plain HTTP/2 without TLS. |
| service | Empty | Optional. The service name sent in the health request, such as acme.orders.v1.Orders. Empty asks about the server as a whole. Spaces give No spaces in a service name. |
| assertions — response-time only for grpc | None | Response time only. |
Assertions supported#
response_time_ms only: how long the health call took. The operator list shows eq, neq, contains, lt, gt and matches.
Example#
{
"name": "orders gRPC",
"host": "api.acme.io",
"port": 443,
"serviceName": "acme.orders.v1.Orders",
"intervalSeconds": 60,
"assertions": [
{"type": "response_time_ms", "op": "ASSERTION_OP_LT", "value": "200"}
]
}Good to know#
- Your server must register the gRPC health service. Most gRPC frameworks include one you can turn on.
- Server errors:
host required,port must be in 1..65535,service_name must not contain spaces,service_name must be at most 255 characters.