Skip to main content

Health Check API

/health - Service health check endpoint

Overview

The health check endpoint is used to verify that the Gateway service is running properly.

Endpoint

MethodPathDescription
GET/healthHealth check

Detailed Description

GET /health

Check service health status.

Response:

{
"status": "ok",
"service": "viben-gateway",
"version": "1.0.0",
"timestamp": "2024-01-16T10:00:00Z",
"uptime": "running"
}
FieldDescription
statusService status (ok)
serviceService name
versionVersion number
timestampCurrent time
uptimeRunning status

Usage Example

# Check if Gateway is running
curl http://127.0.0.1:18790/health

# Expected output
{"status":"ok","service":"viben-gateway","version":"1.0.0",...}

Monitoring Integration

The health check endpoint is suitable for:

  • Load balancer health checks
  • Kubernetes liveness/readiness probes
  • Monitoring system status detection
# Kubernetes probe configuration example
livenessProbe:
httpGet:
path: /health
port: 18790
initialDelaySeconds: 5
periodSeconds: 10