Monitoring

gRPC monitor

Monitor gRPC services through the standard gRPC Health Checking Protocol, catch service-to-service failures with the same rigor as external HTTP checks.

In the app: New monitor

Many microservices talk to each other over gRPC. A plain uptime check can't tell whether a gRPC service is healthy; the service reports that itself (SERVING or NOT_SERVING) through the standard health RPC. A gRPC monitor calls the same grpc.health.v1.Health/Check RPC that platform readiness probes use.

When to use

  • Internal APIs: payment, authentication, or inventory services that other services call over gRPC.
  • Mobile and web gateways: apps often reach a gRPC-Web gateway in front of the core services.
  • ML serving: TensorFlow Serving, Triton, and most inference servers expose gRPC health.
  • Health for partners: when a customer integrates over gRPC and needs an external uptime number.

How the check runs

The monitor implements the gRPC Health Checking Protocol v1:

  1. Dial, open a gRPC connection to host:port.
  2. Call, invoke grpc.health.v1.Health/Check with an empty service name.
  3. Evaluate, expect SERVING. Anything else (NOT_SERVING, UNKNOWN, SERVICE_UNKNOWN) marks the monitor down.
  4. Close, close the connection.

The check does not require you to ship your .proto files, the health-check proto is standard across every gRPC implementation.

Creating the monitor

  1. On the Monitors page choose Add monitor.

  2. Choose gRPC Service as the type (some types sit under Show 7 more types).

  3. Fill in:

    • Display name: e.g. PaymentService health
    • gRPC Server and Port: Server name and port. The form joins them as host:port, and the connection is plaintext.
    • Check interval: plan-dependent minimum (see the pricing page for current values).
    • Timeout (sec) under Alert settings: default 30 s.
  4. Save with Start monitoring.

For TLS, type grpcs://payment.example.com into the server field, or after saving edit the URL field under Configure → General to grpcs://host:port. The API accepts all three forms: host:port (plaintext), grpc://host:port (plaintext, explicit scheme) and grpcs://host:port (TLS). An address with no scheme and no port is tried on port 443 in plaintext.

The Method and Proto definition fields under Configure → Request in the monitor's detail page have no effect on the check; it is always the standard Health/Check call.

TLS vs plaintext

URL prefixConnection typeTypical use
grpcs://payment.example.com:443TLS (public trust store)Internet-facing services behind a load balancer with a real certificate.
grpc://payment.example.internal:9000PlaintextService mesh interior (Linkerd, Istio, Consul). The check must run from inside the mesh, plaintext over the public internet is never safe.
payment.example.com:443 (no scheme)PlaintextLegacy shorthand, equivalent to grpc://. Prefer the explicit scheme.

Reaching internal services

By default UptimeWarden only dials public targets. To monitor cluster-internal gRPC endpoints, run a custom agent inside your environment; private network access can be enabled per-agent.

What "SERVING" actually means

Your service decides what SERVING requires. The default most frameworks ship:

  • Go: return SERVING as soon as the gRPC server is up.
  • Java: same, via HealthStatusManager.
  • Node.js: same, via the built-in health service.

This is a liveness check, not a deep health check. If you need to verify database connectivity or queue health, register named health services inside your server. The standard UptimeWarden check sends an empty service name, which corresponds to overall server health.

Common failure modes

Error messageLikely cause
gRPC connection failed: ...The name cannot be resolved or the address is blocked.
gRPC health check failed: ... code = UnavailableNo service listening, wrong port, or TLS mismatch (plaintext client vs TLS server).
gRPC health check failed: ... code = UnimplementedThe server does not implement the standard health proto. Add HealthStatusManager (Java), health.NewServer() (Go), or the equivalent.
gRPC service status: NOT_SERVINGThe service implemented the proto and is deliberately reporting unhealthy. Check your readiness logic.
... certificate signed by unknown authorityThe grpcs:// target uses a certificate the public trust store does not recognise. Use grpc:// from an in-mesh agent.

SLA and notifications

  • Down: dial error, call error, or NOT_SERVING.
  • Recovery: a subsequent check returns SERVING.
  • Multi-location consensus: supported: useful in multi-region service meshes.
  • SLO tracking: supported: pair a gRPC monitor with an availability SLO for each service.

FAQ

Q: Can I monitor a specific gRPC service (e.g. payment.orders) instead of the whole server? A: The standard check sends an empty service name for overall server health. Workaround: expose the sub-service as its own gRPC server and monitor it separately.

Q: My service uses gRPC-Web behind a proxy. Should I use gRPC or HTTP monitoring? A: Both have their place. The gRPC monitor catches upstream service failures; an HTTP monitor against the gRPC-Web endpoint catches proxy or CORS issues. Run them in parallel.

Q: The check says "Unimplemented", my server has a health endpoint, what's wrong? A: The server implements some health service, but not grpc.health.v1.Health. Many teams write custom ones, switch to the standard proto (grpc/health/v1/health.proto); it is five lines.

Bu sayfayı Türkçe okuyun