mirror of
https://github.com/TwiN/gatus.git
synced 2026-02-04 16:59:42 +00:00
feat(client): Add support for monitoring gRPC endpoints (#1376)
* add grpc * add gRPC to readme
This commit is contained in:
40
README.md
40
README.md
@@ -121,6 +121,7 @@ Have any feedback or questions? [Create a discussion](https://github.com/TwiN/ga
|
||||
- [Monitoring a UDP endpoint](#monitoring-a-udp-endpoint)
|
||||
- [Monitoring a SCTP endpoint](#monitoring-a-sctp-endpoint)
|
||||
- [Monitoring a WebSocket endpoint](#monitoring-a-websocket-endpoint)
|
||||
- [Monitoring an endpoint using gRPC](#monitoring-an-endpoint-using-grpc)
|
||||
- [Monitoring an endpoint using ICMP](#monitoring-an-endpoint-using-icmp)
|
||||
- [Monitoring an endpoint using DNS queries](#monitoring-an-endpoint-using-dns-queries)
|
||||
- [Monitoring an endpoint using SSH](#monitoring-an-endpoint-using-ssh)
|
||||
@@ -2956,6 +2957,45 @@ shows whether the connection was successfully established. You can use Go templa
|
||||
syntax.
|
||||
|
||||
|
||||
### Monitoring an endpoint using gRPC
|
||||
You can monitor gRPC services by prefixing `endpoints[].url` with `grpc://` or `grpcs://`.
|
||||
Gatus executes the standard `grpc.health.v1.Health/Check` RPC against the target.
|
||||
|
||||
```yaml
|
||||
endpoints:
|
||||
- name: my-grpc
|
||||
url: grpc://localhost:50051
|
||||
interval: 30s
|
||||
conditions:
|
||||
- "[CONNECTED] == true"
|
||||
- "[BODY].status == SERVING" # BODY is read only when referenced
|
||||
client:
|
||||
timeout: 5s
|
||||
```
|
||||
|
||||
For TLS-enabled servers, use `grpcs://` and configure client TLS if necessary:
|
||||
|
||||
```yaml
|
||||
endpoints:
|
||||
- name: my-grpcs
|
||||
url: grpcs://example.com:443
|
||||
conditions:
|
||||
- "[CONNECTED] == true"
|
||||
- "[BODY].status == SERVING"
|
||||
client:
|
||||
timeout: 5s
|
||||
insecure: false # set true to skip cert verification (not recommended)
|
||||
tls:
|
||||
certificate-file: /path/to/cert.pem # optional mTLS client cert
|
||||
private-key-file: /path/to/key.pem # optional mTLS client key
|
||||
```
|
||||
|
||||
Notes:
|
||||
- The health check targets the default service (`service: ""`). Support for a custom service name can be added later if needed.
|
||||
- The response body is exposed as a minimal JSON object like `{"status":"SERVING"}` only when required by conditions or suite store mappings.
|
||||
- Timeouts, custom DNS resolvers and SSH tunnels are honored via the existing [`client` configuration](#client-configuration).
|
||||
|
||||
|
||||
### Monitoring an endpoint using ICMP
|
||||
By prefixing `endpoints[].url` with `icmp://`, you can monitor endpoints at a very basic level using ICMP, or more
|
||||
commonly known as "ping" or "echo":
|
||||
|
||||
Reference in New Issue
Block a user