Skip to main content
Configure health endpoints and metrics collection to monitor your Golf Gateway deployment and set up alerting.

Prerequisites

  • Golf Gateway deployed and running
  • Monitoring system

Health endpoints

Golf Gateway exposes two health endpoints:

/health - Liveness probe

Returns component health status:
curl http://localhost:8080/health
Response:
{
  "status": "healthy",
  "redis": "ok",
  "redis_circuit_breaker": "closed",
  "database": "ok",
  "upstreams": "3 configured",
  "http_client": "ok",
  "gateway_id": "abc-123",
  "gateway_name": "production-gateway"
}
Status CodeMeaning
200All components healthy
503One or more components unhealthy

/readiness - Readiness probe

Returns whether gateway is ready to accept traffic:
curl http://localhost:8080/readiness
Response:
{
  "status": "ready",
  "draining": false,
  "http_client": "initialized",
  "upstreams": "3 loaded",
  "redis_manager": "initialized"
}
Status CodeMeaning
200Ready to accept traffic
503Not ready or draining

Kubernetes probes

Configure probes in your deployment:
apiVersion: apps/v1
kind: Deployment
spec:
  template:
    spec:
      containers:
      - name: golf-gateway
        livenessProbe:
          httpGet:
            path: /health
            port: 8080
          initialDelaySeconds: 30
          periodSeconds: 10
          failureThreshold: 3
        readinessProbe:
          httpGet:
            path: /readiness
            port: 8080
          initialDelaySeconds: 5
          periodSeconds: 5
          failureThreshold: 2

Health status levels

StatusMeaning
HEALTHYAll systems operational
DEGRADEDPartial issues, still functional
UNHEALTHYCritical issues, exports blocked